[SOLVED] Design a class that maintains expenses

20.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)
Design a class that maintains expenses. It should contain the following:ExpenseAmount – array of 4 float values (Review section 13.12 from last week)
Create a public TotalExpense method that sums the values in the ExpenseAmount array.2. Create a getter method to return the ExpenseAmount Array. You still need to set the expense values and can do that by adding a method that allows you to set the value at a specific index for the array.** At this point, it may be worthwhile to create your own test program to confirm the methods work as expected.3. Modify the ” Pet Food Company’s quarterly summarized activity ” class to use the above ExpenseMaintenance Class instead of a float for total expenses.4. This program should behave similar to Assignment 1, but instead of asking for a total expense for each instance, it will prompt for 4 expenses and display the calculated total expense.
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.