Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Design a class that manages a Pet Food Company's quarterly summarized activity. It should contain the following: ( This is all private data )

1. Design a class that manages a Pet Food Company's quarterly summarized activity. It should contain the following: ( This is all private data ) Company Name - char[40] // This is a static member Quarter - char // This is a static member. Validate to be 1-4 in the setter method Division Name - char[40] BonusBudgetRate - float - set to 0.02 Total Sales - float Total Expenses - float Also create a public method named netIncome which will return total sales - total expenses as float. 2. Create public class methods (Setters and Getters) that load the data values. 3. Do not create getter/setter methods for the BonusBudgetRate item. It can be set in a constructor or initialized to the default value of 0.02. There is no other reference to it. 4. Create 3 instances of the class - dogFoodMaker, catFoodMaker, fishFoodMaker. 5. Prompt me to enter the Company Name and Quarter only once. Internally set the division name for each instance. (I.E. "Dog Company" for dogFoorMaker, "Cat FoodCO" to CatFoodMaker, etc) For each of the above instances, prompt me for total sales and total expenses. 6. For each instance of the class, display the Company Name, Quarter. Division Name, Total Sales, Total Expenses and Net Income. The company name should be available in all instances. The deliverable is a working program (CPPs & H files)

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

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago