Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create an array of Customer objects. You should populate the array with 4 to 6 c

ID: 3658484 • Letter: C

Question

Create an array of Customer objects. You should populate the array with 4 to 6 customers, entering information into all fields of the Customer object. Again they should be created in "non-alphabetical" and "non-numeric" order as their last name and customer ID. Display the total number of customers that exist. Print Customer information about each customer. You can either print all information (fields), or print customer ID, last name, first name, boat number, and slip number (excluding address and phone number)

Explanation / Answer

Customer[] Fleet=new Customer[6];
int sum=0;

no of customers = no of customer ids...o it by for loop by incrementing count

print all values by for loop and accesing values of arrays.

///////////////

BOAT

Boat[] Fleet=new Boat[6];
int sum=0;

for(int i=0;i<6;i++){
Console.Write("Enter boat {0}'s somemember: ",i);
Fleet[i].someMember=Int32.Parse(Console.ReadLine());

}

for(int j=0;j<6;j++){
sum+= Fleet[i].someMember;
}
Console.WriteLine("Sum of all boat value: {0},sum.ToString("C"));

///////////////

SLIP

Slip[] array=new Slip[10];

for(int i=0;i<10;i++){
//array[i]
//ask for slip number and other slip info
//set array[i].someMember to info
}

Console.WriteLine{"There were 10 slips"};
for(int j=0;j<10;j++){
console.WriteLine("{0}",array[i].somemember);
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote