Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Getting Started To begin this lab, create a new JavaFX project named abc123-lab7 , and create the following packages, classes, and FXML files: application.Main application.controller.BudgetController

Getting Started

To begin this lab, create a new JavaFX project named abc123-lab7, and create the following packages, classes, and FXML files:

application.Main

application.controller.BudgetController

application.controller.MainController

application.controller.TransactionController

application.model.Budget

Budget.fxml

Main.fxml

Transactions.fxml

App Design

Your program will show a view simiilar to the one shown below when the app is run:

image text in transcribed

This view will be the Main.fxml. If the user clicks the budget overview button, the app will display a general overview of their budget. This view will contain a pie chart, as demonstrated below:

image text in transcribedThis view will be the Budget.fxml. From the main view, if the user clicks the transactions button, the app will display a listing of all transactions, by date. It will show a view similar to the following:

image text in transcribedThis view will be the Transactions.fxml.

In the latter two views, the home button will return the user to the Main.fxml view. The data shown in these two sample views does not reflect that in the given data file - these are only for reference. You may choose the images, fonts, colors, app size, and other style features. Main must have 2 buttons - one to lead to Budget and one to lead to Transactions. Budget must have a pie chart with colored & labeled sections, as well as a key. Transactions must have a scrollable listing of all transactions, ordered by date (where the top is the most recent date). All views must have a title label indicating which view the user is on.

Making it Work

Main.java will launch the application and show Main.fxml. MainController.java will be the EventHandler for this fxml, and should be connected to both buttons. If the user chooses the budget overview button, MainController will replace the current scene on the stage with Budget.fxml. If the user chooses the transactions button, MainController will replace the current scene on the stage withTransactions.fxml.

The Model

Budget.java will be the model of this application, and you will be responsible for deciding on its design. The class must have a data structure (of your choosing) to store the transactions. The class must read in data from data.csv - this file must be placed at the top of the Eclipse project. (Note that we will test with a different file in the same format!) Following the MVC design pattern, the Budget class must not directly update the view - this should always be handled by a controller. You will need to decide what other methods will be needed in this class.

The given data file is populated with a list of transactions - one on each line. Every transaction has a date, name, and dollar amount. From these transactions, you can calculate the total income, total expenses, and the remaining difference. Assume that the only transactions for income will be marked as "paycheck" - all others will be expenses. These calculations must be done in the model.

The MainController should set up a single Budget object for the application. It should call on the Budget class to read in data from the file and populate the Budget object for use in the following two parts.

Budget Overview

The budget overview will be displayed by Budget.fxml and BudgetController.java will be the EventHandler for this. The purpose of this view is to show the calculated income, expenses, and remaining balance as a pie chart to the user. Do not attempt to draw the chart yourself - leverage the JavaFX charts instead.

Transactions

The transactions view will be displayed by Transactions.fxml and TransactionController.java will be the EventHandler for this. The purpose of this view is to show a scrollable listing of all transactions in the given data file.

My Personal Budget Budget Overview Transactions My Personal Budget Budget Overview Transactions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions