Implement at least one constructor

Assignment Help Other Subject
Reference no: EM132151440

Introduction

The objective of this assignment is to extend the implementation of Assignment 1 using arrays and external files.

Carefully read the problem description below. Make sure that you have all the information necessary to start the program. Do not assume what is necessary. There is a discussion board forum: assignment 2. Post your questions there and check it regularly. I will add a Q&A document in Blackboard as soon as I have questions from you.

Specification

The program will allow up to 5 clients and each client will be able to have 2 accounts. The program will start showing 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
- Client age (need to be a positive number. If not, the program will ask the input again)
- Client income per year (need to be a positive number. If not, the program will ask the input again)

- Delete a client
The program will ask the name of the client to be deleted. If the name does not exist, show a message. If the name exists, then the client should be deleted. More information about how to delete will be available in the Q&A document in Blackboard.

- Show 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 name, age, income and number of accounts of this client.

- 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 number of accounts that the client is 2. If it is 2, the program will show a message. If it is less than 2, then the program will ask
• amount of money the client would like to borrow (need to be a positive number. If not, the program will ask the input again)
• number of months the client would like to pay (need to be a positive number. If not, the program will ask the input again)
• type of account

There are two types of accounts the client can choose:
(1) No fees. If the client chooses this option, the interest rate will be a. 6.5% if n < 50
b. 7.5% if 50 <= n < =100
c. 8.5% if n > 100 where n is number of months
(2) Fees. The interest rate will be 6%, but the client needs to pay an additional fee of $10 every month.

- Delete 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 ask which account to delete (1 or 2). If the account does not exist, show a message. If the account exists, the account will be deleted.

- Show account details
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 which account the client would like to see. If the account does not exist, the program will show a message. If it exists, the program will display all the details of the account, which will be:
• Amount
• Number of months
• Type of account
• Total payment
• Total interest paid
• Amortisation table, which will have the following columns:
o month
o initial balance
o payment
o interest paid
o principal paid
o final balance

- Save in a file
The program will save in a file (txt format) the information of each client (the same information described in "show client" above) and each account (the same information described in "show account details" 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".

- Finish the program
Exit the program.

Program Requirements

There must be three classes: Client, Account and LoanCalculator.

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

It will hold the required instance data for an account and it will have suitable methods to access and modify the data for an account.

The instance variables will be
• interestRate - double
• numberOfMonths - int
• amount - double
• accountType - String

You need to implement at least one constructor, which will initialize the instance variables with values from parameters. The class needs to have methods to change and access all instance variables. It will also have the following methods (at least):

• setInterestRate, which will set the value in the interestRate which will depend on the type of the account (as explained above).
• calculateMontlyPayment as explained in assignment 1.
• setAmortizationTable - it will return a String with the table information.

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

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.

The instance variables will be:
• name - String

• age - int
• income - double
• loan[] - array of Account - size 2

You need to implement at least one constructor that will have the parameters name, age and income. The class needs to have methods to change and access all instance variables.

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

It will receive inputs and show outputs. It will have an array of Client of size 5. This is the only class that should have a
main method. The class LoanCalculator will also be the only one that will receive inputs and show outputs.

You can use TIO or GUI (it is your choice). On both cases, you should use only the classes have seen in lectures.

All the instance variables of your classes need to be private (this means that you are applying the principles of encapsulation).

Attachment:- Assign.rar

Reference no: EM132151440

Questions Cloud

What is the effective interest rate if they do not pay cash : The company can pay cash, $5 million, or pay $1 million now and $625 thousand each year for 8 years.
What effective interest rate are terms equivalent : The dealer is willing to accept a $800 down payment and 3 annual payments of $450 each. At what effective interest rate are these terms equivalent?
Museum of modern art get after sale : However, for this problem, assume that the Museum paid $12,500 for the painting in 1931 and sold it for a record-breaking $550 million in 2017.
Contract under the doctrine of mutual mistake : But when he arrives home, he discovers that the book value of the car is only $10000. May David avoid the contract under the doctrine of "mutual mistake?
Implement at least one constructor : SENG1110 - 6110 Programming - implement at least one constructor that will have the parameters name, age and income. The class needs to have methods
Contracting with an international : From a purely business standpoint, are there issues arise from contracting with an international- based versus U.S.-based BPO service firm? Explain.
Central and south american countries : What facts would proponents of an expansion of NAFTA (e.g., to include all of Central and South American countries) need to marshall in order to convince you?
What might account for behaviour : After narrowing her search to two establishments located on the same block, she ultimately selects the restaurant with the higher prices.
Discuss the importance of risk associated : Discuss the importance of risk associated with investments in commercial paper and the ways in which the markets deal with that risk.Discuss the importance of r

Reviews

len2151440

10/26/2018 4:20:56 AM

Extra Work for SENG6110 students The program will have an extra option: sort clients, where the clients in the arrays will be sorted alphabetically. You can implement any sorting algorithm for this task. In the lecture and computer lab of week 9 you will find resources to complete this task. Contact Regina if you need help. SENG1110 students that implement this task will receive extra 15 points (the maximum mark of your assignment 2 is 100) Late Penalty and adverse circumstances Note that your mark will be reduced by 10% for each day (or part day) that the assignment is late. This applies equally to week and weekend days. You are entitled to apply for special consideration because adverse circumstances have had an impact on your performance in an assessment item. This includes applying for an extension of time to complete an assessment item.

len2151440

10/26/2018 4:20:46 AM

All the instance variables of your classes need to be private (this means that you are applying the principles of encapsulation). Your solution must be your own work. Marks will be awarded for: layout, both visual (variable names, indentation) and structural (scope of variables, use of methods); documentation (comments); and ability of the submission to perform as specified. A more detailed marking schema will be available in Blackboard. What to submit. You should submit the Java files (Client.java, Account.java and LoanCalculator.java) and the assignment cover sheet (available in Blackboard) electronically under the Assignment 2 link in Blackboard. No .class files should be included in your submission, only .java files.

len2151440

10/26/2018 4:20:29 AM

Please make it in Blue J i already specified some important things in subject and again i'm explaining you that i'm Seng6110 so i have some specific requirements to complete it oterwise marks will be deducted.i'm going to attach each and every document that will be helpfull for you. please give me response about that as soon as you can. if need any further information please let me know.Thank you

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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