Write a program to track and manage your money transactions


Someone has given you a lot of money and you are having a hard time explaining to them where did all your money go. In the advanced portfolio, you will write a program to track and manage your money transactions. We will call each money transaction an "Expense" which contains information about the date, amount, and description of the money transaction.

The program will have a menu drive interface for the user to perform the following tasks:

1. Add a new Expense by entering the date, amount, and description of the Expense.
2. Print a report of all Expenses
3. Import data from a text file by prompting the user to enter the location of the file
4. Export data to a text file by prompting the user to enter the location of the file
5. Remove an existing Expense by prompting the user to enter the index number of the Expense to remove
6. Update an existing Expense by prompting the user to enter the index of the Expense to edit and then prompting the user to enter the new date, amount, and description.
7. Sort the list of all Expense descending by the date

Instructions

1. Create a new Console application. In your Console application, create a new class named Expense and write the code to implement the UML class diagram shown below. You can implement the properties of the class as either fully-implemented properties or auto-implement properties. In the default constructor set the date to the current date. You must implement all the properties and methods

Expense
+ date : DateTime
+ amount : decimal
+ description : string
+Expense() :
+Expense(date: datetime, amount: decimal, description: string) :

2. In your Console application, create a new class named ExpenseManager and write the code to implement the UML class diagram shown below. The ExpenseManager is for managing the list of Expense in your application. The expenseList field contains the "data" (a list of Expense) for the program. The Count read only property returns the size of expenseList. You must implement all the properties and methods

ExpenseManager
- expenseList : List = new List()
+ Count : int {READONLY}
+ ExpenseManager() :
+ AddExpense(currentExpense: Expense) : void
+ PrintReport() : void
+ ImportData(filePath: String) : bool
+ ExportData(filePath: String) : bool
+ RemoveExpenseAt(index: int) : bool
+ TotalAmount() : decimal
+ GetExpenseAt(index: int) : Expense
+ SortByDateDescending() : void
+ UpdateExpense(index:int, expense: Expense) : bool

3. Write a menu driven interface for your program as attached below. It must handle all invalid inputs (including those not depicted here).

4. Write the code to implement the "New Expense" menu option as shown in the sample run below. The date format required is a sample only. You can use the same format as the sample or define your own format.

New Expense sample run

5. Write the code to implement the "View Expense Report" menu option as shown in the sample run attached.

6. Write the code to implement the "Remove Expense" menu option as shown in the sample runs attached.

7. Write the code to implement the "Edit Expense" menu option as shown in the sample run attached.

8. Write the code to implement the "Import Data" menu option as shown in the sample run below. For each Expense in expenseList, write the date, amount, and description of the Expense on a single line and separate each field with a delimiter of your choice.

9. Write the code to implement the "Export Data" menu option as shown in the sample run below. You can assume that each line contains the date, amount, and description for a single Expense.

10. Write the code to implement the "Sort the data descending the date" menu option as shown in the sample run.

Attachment:- AdvanceCore.rar

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a program to track and manage your money transactions
Reference No:- TGS02863323

Now Priced at $45 (50% Discount)

Recommended (91%)

Rated (4.3/5)