Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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);

}

image text in transcribed

image text in transcribed

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 DELL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

What arrangement will you use in presenting your report?

Answered: 1 week ago

Question

=+Have they changed the way employees view IP?

Answered: 1 week ago