Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help with this task turning this into C# . Your task for this week is to implement these classes. This includes creating the classes
Need help with this task turning this into C# Your task for this week is to implement these classes. This includes creating the classes and implementing the functionality that those classes will provide. The one exception is database interaction code. Database interactions will be implemented during Week
Once you have completed implementing the classes for your application, zip the cs files and submit the zip file using the instructions below. I am developing an application that will assist users in tracking and analyzing their monthly expenditures. The aim of this application is to provide users with a tool to manage their finances and budget more effectively by presenting them with an extensive overview of their spending habits. The application output will consist of visually appealing graphs and charts, which will provide users with a comprehensive representation of their monthly expenses. The data for this application will be stored in a relational database, comprising the user's monthly expenses, category information, date and time information, and user information. The data will be accessed and manipulated using SQL queries.
Class Definitions
Expense Tracker Class
Properties:
list of expenses List
list of categories List
user User
Methods:
addExpenseExpense expense: adds a new expense to the list of expenses
removeExpenseExpense expense: removes an expense from the list of expenses
getExpensesByCategoryCategory category: returns a list of expenses filtered by category
getTotalSpending: returns the total amount of money spent by the user
getSpendingByCategoryCategory category: returns the total amount of money spent in a given category
Special Considerations:
toString: returns a string representation of the expense tracker
access specifiers: all properties and methods are public
Expense Class
Properties:
id int: unique identifier for the expense
amount double: amount of money spent
description String: description of the expense
category Category: category of the expense
date LocalDate: date of the expense
Methods:
getId: returns the ID of the expense
getAmount: returns the amount of the expense
getDescription: returns the description of the expense
getCategory: returns the category of the expense
getDate: returns the date of the expense
Special Considerations:
toString: returns a string representation of the expense
access specifiers: all properties and methods are public
Category Class
Properties:
name String: name of the category
Methods:
getName: returns the name of the category
Special Considerations:
toString: returns a string representation of the category
access specifiers: all properties and methods are public
User Class
Properties:
id int: unique identifier for the user
name String: name of the user
email String: email of the user
Methods:
getId: returns the ID of the user
getName: returns the name of the user
getEmail: returns the email of the user
Special Considerations:
toString: returns a string representation of the user
access specifiers: all properties and methods are public
Data Storage:
Table names:
Expense
Category
User
Fields the table will contain, including data type: Expense:
id int primary key
amount double
description varchar
categoryid int foreign key
date date Category:
id int primary key
name varchar User:
id int primary key
name varchar
email varchar
Table relationships, if any:
Expense.categoryid is a foreign key that references Category.id This establishes a onetomany relationship between Category and Expense, as one category can have many Class Definitions:
ExpenseTracker
Properties:
List expenses: stores all expenses added by the user
Methods:
addExpenseExpense expense: adds a new expense to the expenses list
removeExpenseint index: removes an expense from the expenses list based on the index provided
getExpensesByCategoryString category: returns a list of expenses for a specific category
getExpensesByDateRangeDate startDate, Date endDate: returns a list of expenses within a given date range
getTotalExpenses: returns the total amount spent by the user
getExpenseSummary: returns a summary of expenses by category
Special considerations:
Class hierarchy: None
Access specifiers: All methods and properties are public
Expense
Properties:
String name: the name of the expense
double amount: the amount spent on the expense
String category: the category of the expense
Date date: the date the expense was incurred
Methods:
getName: returns the name of the expense
getAmount: returns the amount spent on the expense
getCategory: returns the category of the exp
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started