Question: use c++ please. Fishmonger's counter Task: Create the class FISH suitable for a fishmonger's counter, with reference to the Table below. 1. Implement code for

 use c++ please. Fishmonger's counter Task: Create the class "FISH suitable
for a fishmonger's counter, with reference to the Table below. 1. Implement
use c++ please.
code for all methods, constructors, accessors, mutators, functions, etc, necessary to create

Fishmonger's counter Task: Create the class "FISH suitable for a fishmonger's counter, with reference to the Table below. 1. Implement code for all methods, constructors, accessors, mutators, functions, etc, necessary to create objects and automatically populate the class using this data (25%) 2. Draw the UML glyph for the class (5%) Your code must: Ensure Purchase Cost per item is used to automatically determine Selling Price; Ensure the number of units are randomly generated within stated min-max bounds; Ensure the Expiry Date is calculated from the date at the time of data entry (using the clock on the computer). Fish Cod Plaice Salmon Haddock Tuna Mean Weight (kg) 0.37 0.37 1.30 0.37 0.45 Purchase Cost (/kg) Selling Price (/kg) Units (min-max) 6.50 2 x Purchase Cost 10-20 5.25 2 x Purchase Cost 10-20 4.50 3 x Purchase Cost 15-25 4.00 3 x Purchase Cost 5-15 6.25 4x Purchase Cost 1-10 Expiry Date Entry Date + 3 Entry Date + 3 Entry Date + 3 Entry Date + 3 Entry Date + 3 3. Add functions to the class to calculate the total weight of any given fish and the cost and selling price per unit (9%) 4. Assume the counter begins with a total income of 50. Add a purchasing function that increases stock and decreases income accordingly (10%) 5. Add a unit sale function that decreases stock, logs income and calculates profit, displaying each (11%) 6. Derive a new class "SHELLFISH" from the "FISH" class and populate it using the data in the following Table: (10%) Shellfish Mussel Prawn Scallop Mean Weight (kg) 0.05 0.02 0.03 Purchase Cost (/kg) Selling Price (/kg) Units (min-max) 4.00 4x Purchase Cost 40-200 6.25 4x Purchase Cost 50-150 6.50 5 x Purchase Cost 20-100 Expiry Date Entry Date + 2 Entry Date + 2 Entry Date + 2 7. Add a function to the "SHELLFISH" class to calculate the number of packets of prawns in stock given that each packet holds 30 prawns (10%) 8. Add a function to enable the sale of prawns in packets, calculate and display the cost per packet of prawns and the profit from the sale of each packet, updating stock and income as necessary (10%) 9. Write main () code that uses the fish and shellfish classes to manipulate produce at a fish counter, with a user interface that facilitates sales and purchases (10%) Note: A bonus of 10% will be given if you use a dynamic array to manipulate produce for the store with elements of the array associated with different types of fish/shellfish. You should delete any dynamic objects created once program execution terminates A bonus of 5% will be given if you include a clear example of polymorphism Your class must be rigorously encapsulated (no direct access to class variables) or you will suffer a 5% score penalty You are required to write a report, which should include your planning of the project and implementation of the code. UML diagram(s) will be useful. The report does not need to be extensive. It should include a statement of the problem to be solved, the structure of your code and a plan of input/output. Then paste in your code. You should also include screenshots demonstrating the running of the code. The report does not need to be more than a few pages, but just enough for you to explain how you planned your code and how it works. You can complete this assignment by creating one class and one derived class. The individual fish and shellfish can be instances (objects of each class). Create accessors and mutators for all data in the classes. In the class, define a function to set the expiry date (these offer opportunities to use polymorphism). You can define a selling/purchasing function outside the class or within the class A variable with class-wide scope can be used to keep count of how much is in the till. You should create a simple text-based user interface. This interface will simply provide choices to the user, to e.g. buy or sell produce, display current stock etc. Designing 'bottom-up' may be useful here. Implement each data type sequentially, e.g.create the class with just a 'mean weight' and test that first, create only one object first, one choice for the user... Fishmonger's counter Task: Create the class "FISH suitable for a fishmonger's counter, with reference to the Table below. 1. Implement code for all methods, constructors, accessors, mutators, functions, etc, necessary to create objects and automatically populate the class using this data (25%) 2. Draw the UML glyph for the class (5%) Your code must: Ensure Purchase Cost per item is used to automatically determine Selling Price; Ensure the number of units are randomly generated within stated min-max bounds; Ensure the Expiry Date is calculated from the date at the time of data entry (using the clock on the computer). Fish Cod Plaice Salmon Haddock Tuna Mean Weight (kg) 0.37 0.37 1.30 0.37 0.45 Purchase Cost (/kg) Selling Price (/kg) Units (min-max) 6.50 2 x Purchase Cost 10-20 5.25 2 x Purchase Cost 10-20 4.50 3 x Purchase Cost 15-25 4.00 3 x Purchase Cost 5-15 6.25 4x Purchase Cost 1-10 Expiry Date Entry Date + 3 Entry Date + 3 Entry Date + 3 Entry Date + 3 Entry Date + 3 3. Add functions to the class to calculate the total weight of any given fish and the cost and selling price per unit (9%) 4. Assume the counter begins with a total income of 50. Add a purchasing function that increases stock and decreases income accordingly (10%) 5. Add a unit sale function that decreases stock, logs income and calculates profit, displaying each (11%) 6. Derive a new class "SHELLFISH" from the "FISH" class and populate it using the data in the following Table: (10%) Shellfish Mussel Prawn Scallop Mean Weight (kg) 0.05 0.02 0.03 Purchase Cost (/kg) Selling Price (/kg) Units (min-max) 4.00 4x Purchase Cost 40-200 6.25 4x Purchase Cost 50-150 6.50 5 x Purchase Cost 20-100 Expiry Date Entry Date + 2 Entry Date + 2 Entry Date + 2 7. Add a function to the "SHELLFISH" class to calculate the number of packets of prawns in stock given that each packet holds 30 prawns (10%) 8. Add a function to enable the sale of prawns in packets, calculate and display the cost per packet of prawns and the profit from the sale of each packet, updating stock and income as necessary (10%) 9. Write main () code that uses the fish and shellfish classes to manipulate produce at a fish counter, with a user interface that facilitates sales and purchases (10%) Note: A bonus of 10% will be given if you use a dynamic array to manipulate produce for the store with elements of the array associated with different types of fish/shellfish. You should delete any dynamic objects created once program execution terminates A bonus of 5% will be given if you include a clear example of polymorphism Your class must be rigorously encapsulated (no direct access to class variables) or you will suffer a 5% score penalty You are required to write a report, which should include your planning of the project and implementation of the code. UML diagram(s) will be useful. The report does not need to be extensive. It should include a statement of the problem to be solved, the structure of your code and a plan of input/output. Then paste in your code. You should also include screenshots demonstrating the running of the code. The report does not need to be more than a few pages, but just enough for you to explain how you planned your code and how it works. You can complete this assignment by creating one class and one derived class. The individual fish and shellfish can be instances (objects of each class). Create accessors and mutators for all data in the classes. In the class, define a function to set the expiry date (these offer opportunities to use polymorphism). You can define a selling/purchasing function outside the class or within the class A variable with class-wide scope can be used to keep count of how much is in the till. You should create a simple text-based user interface. This interface will simply provide choices to the user, to e.g. buy or sell produce, display current stock etc. Designing 'bottom-up' may be useful here. Implement each data type sequentially, e.g.create the class with just a 'mean weight' and test that first, create only one object first, one choice for the user

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!