Question: in java Project: Student Account Class Problem Description: (The Account class) Design a class named Account that contains: A private String data field named id
Project: Student Account Class Problem Description: (The Account class) Design a class named Account that contains: A private String data field named id for the account (default "00000000"). A private double data field named balance for the account (default 0.0). A private String data field named name that stores the student's full name (default ""). A private String data field named address that stores the student's home address (default ""). A no-arg constructor that creates a default Account. A constructor that creates an Account with the specified id, initial balance, name, and address. The getter and setter methods for balance. A method named withdraw that withdraws (subtracts) a specified amount from the balance. A method named deposit that deposits (adds) a specified amount to the balance. A method named clear that clears the balance (sets it to 0.0). Write a test program that creates an Account object with an account ID of 00455420, a balance of $100.50, a name of "John Doe", and an address of your choice. Use the withdraw method to withdraw $4.50, use the deposit method to deposit $7.75, and use the clear method to set the balance back to 0.0. Use the getter for your balance field to print this balance value after object creation, after the withdrawal, and after the deposit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
