Question: java Create a package named cs520.hw2.part2 and complete the following by writing the appropriate classes under this package. Transform the procedural style computation of the


java
Create a package named cs520.hw2.part2 and complete the following by writing the appropriate classes under this package. Transform the procedural style computation of the previous problem into an objectoriented application. In order to do this, create two classes named BankCD and BankingObjectStyle as specified below. a. The class named BankCD describes each CD offering and should have The instance (or member) variables - bankName (String), initialDeposit (integer), rate (double) and numberOfYears (integer). A single constructor that takes the name of the bank. The appropriate set methods for the above variables except the bank name. The appropriate get methods for all of the instance variables. The method getFinalValue, of type double, which returns the final value of this CD. The method printCDDetails, of type void, which disnlays thn dotoil +bio name. The appropriate get methods for all of the instance variables. The method getFinalValue, of type double, which returns the final value of this CD. The method printCDDetails, of type void, which displays the details of this CD to the console. This method should invoke the getFinalValue method as part of its output. class named BankingObjectStyle creates two CD objects and tests them as WS: In the main method, instantiate two objects of the type BankCD named bank1CD and bank2CD. Perform the equivalent steps to the ones carried out in Part 1 by setting the appropriate values for the objects. Print the details of the two objects. Invoke the getFinalValue method for comparing the two. The output should be the same as in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
