Question: Course Concept(s) Covered Using Objects Basic Class Structure Instance Variables Instructions Create a folder called CSC1130_Writing Classes 1 yourlastname, Store all of the files for

Course Concept(s) Covered Using Objects Basic Class Structure Instance Variables Instructions Create a folder called CSC1130_Writing Classes 1 yourlastname, Store all of the files for this lab in that folder. Once you have completed the lab, upload the zipped folder in Canvas Write a program that will allow the user to enter information about a Savingsaccount, and which will calculate and print the projected balance in the account at the end of the 12 months provided there is no account activity Use the following 2 classes to do this. Write the Savings Account class first Specifications Savings AccountAttributes - one for the interest rate and one for the amount in the account (choose appropriate variable names and data types) Behaviors - 2 constructors (default and 2-arg constructor), and behaviors to allow for deposits, withdrawals, and calculation of the year end balance Class Driver Drives the flow of the logic by doing the following: Allows user to input original balance Allows user to input interest rate Creates an instance of a SavingsAccount using the 2-arg constructor Allows user to input total deposit amount Allows user to input total withdrawal amount . Calculates and prints the projected year-end balance provided there is no further activity on the account Sample program execution: G C:\WINNT\System32\cmd.exe - java Driver x 1 Enter the balance in the account: 635 Enter the interest rate for the account: .025 Enter sum of deposits: 570 Enter sum of withdrawals: 205 The ending balance for this account will be: 1025.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
