Question: C++ Coding problem, please help me. I've been stuck on this for a while and would really appreciate commenting the code so I can look

C++ Coding problem, please help me. I've been stuck on this for a while and would really appreciate commenting the code so I can look back and try to understand and learn what the program is doing.

C++ Coding Problem. - Two Dimensional Table of Fruit sorted into 26 separate arrays, each array holding fruit starting with a letter of the alphabet.

( Hint: Draw a diagram/table/illustration - an Array of Arrays - to help you )

Part 1 - Define 3 classes -

1) Define a Date class

Write a Date class with variables mm, dd, yyyy, and the needed functions.

2) Define a 'Single Fruit class' - ( Composed with date class )

Write a class, aFruit, that can store the name of a fruit, the price per item and the date entered in the system , and needed functions

3) Define a 'List of Fruits class ( Dimension 1 ) - ( Composed with Single Fruit class )

Write a class, myFruitList, that can store a list of 10 fruits in an array, and the needed functions, be sure to have a sort function in the class.

4) Define an array of 26 'Lists of Fruits' class. ( Dimension 2 ) - ( Composed with a List of Fruit classes )

Write a class, that can create an array of 26 myFruitListArrays classes, and the needed functions, be sure to have a function that call the sort function each index in the array (that list of fruit class)

5) Create a file of 130 different fruits: 5 fruit starting with the same letter, do so for all 26 letters of the alphabet.

Each line contains: a Fruit name, its price, it entry date. ( Be sure fruit order is RANDOMIZED in the file, AFTER you are done typing them in )

Store in a Text file called: myFruitFile.txt << File needs to be turned in separately.

Please, I really need the help and I'm struggling. Please help!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!