JAC444 – Solved

$ 24.99
Category:

Description

Applied Arts & Technology

Workshop 6
Notes:
i. Each task should be presented during the lab, demo worth 70% of the workshop marks and code uploading worth the other 30%.
ii. Make sure you have all security and check measures in place (with proper use of Exceptional Handling where ever needed), like wrong data types etc.
iii. Make your project in proper hierarchy; introduce proper class coherence in your project. Proper packages and your project should be handled by only one main method which should be in a TesterClass.
iv. Given output structure is just for student to have a glimpse what the output can look, students are free to make the output better in any way.

Other inputs can be given during demo, so make sure you test your program properly.

Task 1: (Part A) Design a class named Account which has the following:
• A private int data field named id for the account (default 0).
• A String for First name and another String for last name.
• A private double data field named balance for the account (default 0).
• A private double data field named annualInterestRate that stores the current interest rate (default 0). Assume all accounts have the same interest rate.
• A no-arg constructor that creates a default account.
• A constructor that creates an account with the specified id and initial balance.
• The accessor and mutator methods for id, balance, and annualInterestRate.
• The accessor method for dateCreated.
• A method named getMonthlyInterestRate() that returns the monthly interest rate.
• A method named getMonthlyInterest() that returns the monthly interest.
• A method named withdraw that withdraws a specified amount from the account.
• A method named deposit that deposits a specified amount to the account.

Create an Array of Objects for 10 Accounts with initial balance $100. All the objects should be serialized properly and written on to the file account.dat
Your program should de-serialize all the objects then to show all accounts with their numbers and balances, and account holders first and last names.

(Part B): Now create a GUI for an ATM which is going to use the Account class we created in
Part A. we can update our class with another field,
• Private int pin. (which will hold the pin for each account)
• If your account is registered, then ATM should check the pin verify it and display the next screen.
• Main menu of your ATM consists of o Check Balance o Withdraw Money o Deposit Money
o Exit the account (which will display again the main Menu of the ATM)

Below are some of the screen shots for the ATM

ATM start page (Students are welcome to make it better)

ATM Screen after the confirmed account

Task 2: Write a program that stores, retrieves, adds and updates addresses as shown in the figure below. Use random access file for reading and writing an address. When the program starts your files should be empty with no addresses.
Hint: Use fixed-length string for storing each attribute in the address.

Reviews

There are no reviews yet.

Be the first to review “JAC444 – Solved”

Your email address will not be published. Required fields are marked *