Question: in c++ with a class declaration (header) class definition (cpp file) and main function (cpp file) Assignment on Classes: Define a class, fruitType, to store

in c++ with a class declaration (header) class definition (cpp file) and main function (cpp file)
Assignment on Classes: Define a class, fruitType, to store the following data about a fruit: Fruitname (string), color (string), fat (int), sugar (int), and carbohydrate (int). Implement your class with accessor and mutator, display method to display the output. Write a test program that Reads a data file of 5 different fruits Writes output on monitor and an output file. Compare any two fruits by fat, sugar, & carbohydrate, and display the healthier one 5 Here is a sample data file: Jackfruit green Strawberry red 7 Mango yellow Apple green6 Grape purple 15 120 89 150 30 50 50 30 110 100 40 5 Once done, submit source codes and output in a word file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
