Question: can anyone please solve task 6,7 & 8? Also UML diagram for the whole code would be really helpful. please note: I have already solved
can anyone please solve task 6,7 & 8?
Also UML diagram for the whole code would be really helpful.
please note: I have already solved task 1-5.

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 0.37 0.37 1.30 0.37 0.45 Purchase Cost (E/kg] 6.50 5.25 4.50 4.00 6.25 Selling Price Ekal Units (min-max) 2 x Purchase Cost 10-20 2 x Purchase Cost 10-20 3x Purchase Cost 15-25 3 x Purchase Cost 5-15 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 (99) 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 (E/kg] Selling Price (E/kg) Units (min-max) 4.00 4x Purchase Cost 40-200 6.25 4x Purchase Cost 50-150 6.50 5x 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
