Income tax and investment calculator

Assignment Help JAVA Programming
Reference no: EM133148083

SENG1110 Object Oriented Programming - The University of Newcastle

Income Tax and Investment Calculator

Introduction
The objective of this assignment is to extend the implementation of Assignment 1 using arrays (as seen in weeks 9 and 10) and external files.

SENG1110 students - This assignment can be completed in pairs. SENG6110 students - This assignment must be completed individually.

Before you start
Carefully read the specification below. Make sure you have all the information necessary to start the program. If you are uncertain of something, do not make assumptions. Post your questions to the discussion board forum named "assignment 2" and check it regularly.

Problem specification
The program will allow up to 5 clients and each client will be able to have 2 accounts. The program will have the following options:

• Add a client
If the number of clients is already 5, the program will say that it is not possible to add an extra client. If the number of clients is less than 5, then the program will ask the following inputs:
- Client name - the name needs to have at least two names - first name and last name; if not, the program will show an error message and ask the user the name again. In addition, if a client with that name already exists, the program will show an error message, and asks again.
- Client annual income/salary for an entire year (the salary needs to be a positive number and different from zero; if not, the program will show an error message and ask the salary again).
- Residence - if the user is a resident or not.
- Expenses - the amount of money that the user requires (on an average) per week as living expenditure. You are to assume this expenditure value does not change for the individual over time. The amount needs to be a positive number less than the net salary; if not, the program will show an error message and ask the expenditure again.

• Delete Client
The user needs to enter the client name. Then, the program will delete the client and will display the message "the client was deleted". If the name is not found, the program will display the message "the client does not exist". It is not necessary to ask again.

• Display a client
The program will ask the name of the client. If the name does not exist, show a message. If the name exists, then the program will display the following information of the Client:
- Name
- Gross salary per year and per week.
- Residency status
- The amount of tax the individual pay per year and per week (as defined by the Tax rates described in assign1).
- The net salary per year and per week (calculated the same way as in the assign1).
- If the individual pays the Medicare Levy and if so, how much per year.
- Expenses per week.

- The remaining amount possible to be invested per week. The remaining amount possible to invest is net salary less expenses less the amount already invested (in case the client already has an account). For example, If the net salary is $500 per week, expenses are $100, and the user has one account already investing $200 per week, then the remaining amount available to invest is $200 (500-100-200) per week.
- Each account information, which will be:
- Amount invested per week
- Interested rate
- Number of weeks
- Total amount in the end of the period

• Display all clients: If it does not have any client, the program will display the message "no clients". If clients exist, the program will display the following information of all clients.
- Client 1:
o Name:
o Resident:
o Gross salary (per week):
o Net salary (per week):
o Tax (per week):
o Medicare (per week):
o Expenses (per week):
o No accounts (if the client does not have any account) OR
Number of Accounts:

- Client 2:
...
etc

• Add an account
The program will ask the name of the client. If the name does not exist, show a message. If the name exists, then the program will check if the client already has 2 accounts. If it is 2, the program will show a message. If it is less than 2, then the program will ask
- Investment value - the amount of money that the user would like to invest per week (it is necessary to verify if this amount is feasible. If not, show an error message and ask again). To be considered a feasible amount, it should be less than the remaining amount available to invest. If not, ask again. For example, if the net salary is $500 per week, and the user has no account, and expenses are $100, then the remaining amount available to invest is $400. If the net salary is $500 per week, and the user has one account already investing $200 (and expenses are $100), then the remaining amount available to invest is $200.
- Interest rate - the interest rate of the investment account per annum (the interest rate needs to be between 1% and 20%; otherwise the program will show an error message and ask the user for the interest rate again)
- Investment length - number of weeks that the user will invest the money (it needs to be a positive number and different from zero; otherwise the program will show an error message and ask the number of weeks again)

• Display account.
The program will ask the name of the client. If the name does not exist, show a message. If the name exists, then the program will ask the account number (1 or 2, which is the first or second position in the array). If the account does not exist, the program will display the message "the account does not exist". If not, the program will display the following data about the client and account:

- a table with details of the investment at four week intervals for the length of the investment. For the purposes of this assignment you will assume that interest is only applied at the end of a complete four week period, see the example below. Exactly as assignment 1.

• Delete Account
The program will ask the name of the client. If the name does not exist, show a message. If the name exists, then the program will ask the account number (1 or 2, which is the first or second position in the array). If the account exists, then the program will delete the account and the program will display the message "the account was deleted". If the account does not exist, the program will display the message "the account does not exist".

• Save in a file
The program will save in a file (txt format) the information of each client (the same information described in "show a client" above) and each account (the same information described in "display account" above). If there are no clients, the files should have "no client". For each client, if the client does not have an account, the file should have "no account".

• Exit. The program will end.

Program Requirements

There must be at least three classes: Client, Account and CalculatorInterface.

• The Account Class (the file needs to be Account.java)

You must have the following instance variables (you can include others if you feel they are necessary) and all instance variables must be private.
• rate - double
• numberOfWeeks - int
• amount - double
You need to implement at least two constructors. One will be the default one, it will initialize the variables with 0 or "". The second constructor will have the parameters rate, numberOfWeeks and amount. The class needs to have methods to change and access all instance variables. You will decide which will be the other methods to be implemented in this class.

• The Client Class (the file needs to be Client.java)

You must have the following instance variables (you can include others if you feel they are necessary) and all instance variables must be private.
• name - a String
• grossSalary - double
• netSalary - double
• resident - boolean
• tax - double
• medicare - double
• weeklyExpenses - double
• account - one-dimensional array of Account objects (size 2)

It will hold the required instance data for a client and it will have suitable methods to access and modify the data for a client. You will decide which will be the other methods to be implemented in this class.

• The CalculatorInterface Class (the file needs to be CalculatorInterface.java)

You must have the following variables (you can include others if you feel they are necessary)
• clients - one-dimensional array of Client objects (size 5)
• noClients - the number of clients (it will start with zero). This variable can be declared in the Client class as static variable.
You will decide which methods will be implemented in this class.
This class will create the interface (Terminal IO or GUI, you choose). Only this class will
• Receive the inputs from user and show the outputs.

• Validate input (ie. Negative numbers etc).
• Show error messages.
Notice also that only this class needs to be modified if you decide to implement more than one interface (TIO and GUI).

Attachment:- Income Tax and Investment Calculator.rar

Reference no: EM133148083

Questions Cloud

Questions about the value of deloitte professionals : While Pier had experienced pockets of success with several professionals. many others rejected the approach. Bondili and the team found substantial resistance t
Why do stakeholders in the same organization : Why do stakeholders in the same organization often have different goals? Would it not be best if they shared the same goals? Explain.
Analyze starbucks company : Research and analyze Starbucks Company and answer the questions below: Questions:
Calculate the initial markup percentage required : "A retailer in a boutique jewelry store has estimated expenses of 49%, markdowns at 15%, and stock shortage at 6.3%. A profit of 4% is desired. Calculate the i
Income tax and investment calculator : Income Tax and Investment Calculator - implement at least two constructors. One will be the default one, it will initialize the variables
Explain the issues with excluding the monthly salary : Your company is considering paying a commission to the sales force to expand sales. You are charged by the Chief Financial Officer with 1) computing a new break
Strategic value of upgrading the organizational website : Write a 600-word (minimum length) position paper in which you argue for, or against, the strategic value of upgrading the organizational Website.
Explain the order-processing system : Using suggestions/best practices and your knowledge of use cases, explain in point form the corrections that you would make to this set of main flow of activiti
Three sales goals using the smart formatting : Three sales goals using the SMART formatting (specific, measurable, achievable, relevant, and time-based)

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd