Question
Need help with with this C++ program //This is the file: Mickey 186 Minnie 274 Donald 84 Goofy 841 Daisy 178 Cinderella 387 SnowWhite 718
Need help with with this C++ program
//This is the file:
Mickey 186 Minnie 274 Donald 84 Goofy 841 Daisy 178 Cinderella 387 SnowWhite 718 Aurora 2074 Ariel 478
This is the main that is partially given:
const int MAX_SIZE = 100;
const double COST_PER_DOZ = 1.29;
const double COST_PER_SINGLE_EGG = .12;
int main()
{
int numCustomers;
EggOrder customers[MAX_SIZE];
string fileName;
cout
//cin >> fileName;
fileName = "novemberData.txt";
// Loads all of the customers into the array
numCustomers = loadArray(customers, fileName);
// Sorts all of the orders by customer name
sortOrders(customers, numCustomers);
// Prints all customer orders in the array
// Also prints the amount of each customers
// order using the constants that are
// declared
printOrder(customers, numCustomers);
}
520Assignment%2010.pdf UML Diagram UML is given to the right EggOrder Declare this constant at the top of the header file: const int DOZEN 12 -customerName: string -numDoz: int -numExtra: int Function Descriptions constructors Assigns values to the fields. Notice the one with just one EggOrder) EggOrder(name:string, numDoz:int, numExtra:int) +EggOrder(name:string, totalEggs formal parameter will have to do EggOrder(name:string, totalEggs:int) some calculations +setCustomerName(name:string):void setters Sets the attributes to the value +setNumDoz(numDoz:int):voicd passed in. +setNumExtra(numExtra:int):void getters Return the appropriate attribute getCustomerName):string getTotalEggs +getNumDoz):int +getNumExtra):int computes and returns the total number of eggs. rget TotalEggsO:int Once you have the class working and have tested it continue to the next part. Main Function A main function has been given as well as a data file. You are to write functions that are called by the main function. Output is given on the following page Requireme Comments should be at the top of the program which have your name, class, etc. (Check Assignment one for format) 1. 2. Submit the zipped files (h, .cpp. .cpp) to moodle by the due date DELLStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started