Answered step by step
Verified Expert Solution
Link Copied!

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 4.
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:
addExpense(Expense expense): adds a new expense to the list of expenses
removeExpense(Expense expense): removes an expense from the list of expenses
getExpensesByCategory(Category category): returns a list of expenses filtered by category
getTotalSpending(): returns the total amount of money spent by the user
getSpendingByCategory(Category 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 name(s):
Expense
Category
User
Fields the table will contain, including data type: Expense:
id (int, primary key)
amount (double)
description (varchar(255))
category_id (int, foreign key)
date (date) Category:
id (int, primary key)
name (varchar(255)) User:
id (int, primary key)
name (varchar(255))
email (varchar(255))
Table relationships, if any:
Expense.category_id is a foreign key that references Category.id. This establishes a one-to-many 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:
addExpense(Expense expense): adds a new expense to the expenses list
removeExpense(int index): removes an expense from the expenses list based on the index provided
getExpensesByCategory(String category): returns a list of expenses for a specific category
getExpensesByDateRange(Date 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
1. 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

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions