Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Programming Assignment Fishmonger's counter Task: Create the class FISH suitable for a fishmonger's counter, with reference to the Table below. 1. Implement code for

image text in transcribed

C++ Programming Assignment 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 4 x 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 4 x Purchase Cost 40-200 6.25 4 x 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%)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

Discuss the limitations of K-means clustering.

Answered: 1 week ago

Question

LO2 Explain the nature of the psychological contract.

Answered: 1 week ago