Write a java program for atm machines to meet

Assignment Help C/C++ Programming
Reference no: EM132084637

(Objects and classes) Write a Java program for ATM machines to meet the following requirements:

1. Define an Account class with the following 4 private data fields:

• An int data field named id for the Account user account id (default 0).

• A String data field named name for the Account user name (default "NA").

• A double data field named balance for the Account (default 0).

• A Date data field named dateCreated that stores the date when the Account was created.

2. Implement the following methods for the Account class:

• A constructor with 3 parameters ( id, name, balance ) - assign the parameter values to these 3 data fields and initialize dateCreate= new Date();

• The accessor and mutator methods for balance.

• The accessor method for id, name, dateCreated.

• A method named withdraw that withdraws a specified amount from the Account.

• A method named deposit that deposits a specified amount to the Account.

• A method named printReceipt() that will print the 1) AccountID, 2)Account name, 3) the date

Account was created, and 4) current balance.

3. Write a test program that

• Creates three Account users with initial values as below:

id: assign 1 to the first user, assign 2 to the 2nd user, assign 3 to the 3rd user.

name: you need to assign different name for each user

balance: every user has the same initial amount 2000.

• Call deposit and withdraw methods for every user. The first user deposits 500. The 2nd user withdraws

600. The 3rd user deposit 200 and withdraw 400.

• Call the printReceipt() to display the account information for each user.

• Find the person who has the highest balance after all transactions and show the account name and

balance.

• This project should be coded in ONE java file.

Reference no: EM132084637

Questions Cloud

What the inductive hypothesis provides in the proof : Your proof must explicitly and clearly indicate the base case you prove, the inductive case you prove and what the inductive hypothesis provides in the proof.
Major goals and approaches of evolutionary psychology : What are some of the major goals and approaches of evolutionary psychology? Why is one of its chief proponents a linguist?
What is the modern synthesis : What is the Modern Synthesis? How has Dawkins extended (or simplified) the modern synthesis? What is the meaning of the phrase "selfish gene"?
Inconsistent with darwin theory : What argument physical argument about the earth's age seemed to be inconsistent with Darwin's theory?
Write a java program for atm machines to meet : A constructor with 3 parameters ( id, name, balance ) - assign the parameter values to these 3 data fields and initialize dateCreate= new Date();
Challenge the roman catholic church : 1. How did Luther, Zwingli, Calvin, and Henry VIII each challenge the Roman Catholic church?
Provide your experiences : Provide your experiences, and provide ways people can avoid plagiarism in the future.
Theory and practice of the monarchy : Analyze the ways in which both the theory and practice of the monarchy evolved in England from the death of Elizabeth to the Glorious Revolution
Triumph of french ‘liberty'' over despotism : Why did the fall of the Bastille come to mark the triumph of French ‘‘liberty'' over despotism? Do you think this Parisian newspaper account might be biased?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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