Question: C++ Assignment on Classes: Define a class, fruitType, to store the following data about a fruit: Fruitname (string), color (string), fat (int), sugar (int), and
C++ 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
Here is a sample data file:
Jackfruit green 5 120 50
Strawberry red 7 89 30
Mango yellow 15 150 110
Apple green 6 30 100
Grape purple 5 50 40
Please write the code using separate files for classes as the example below shows:

Storeltem.h #ifndef STOREITEM_H #define STOREITEM_H Storeltem.cpp #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
