Question: Answer all Account Class (10 pts) Design a class Account and the driver class AccountDemo. The class is based on a bank 1. The attributes

 Answer all Account Class (10 pts) Design a class Account andAnswer all

Account Class (10 pts) Design a class Account and the driver class AccountDemo. The class is based on a bank 1. The attributes of Account class are as follows: (1 p) a. long id; I/ should be a default of -1 b. double balance; I/ should be a default of $s c. double interestRate; I! should be a defmult of 0 2. Create two constructors- one with no arguments and the second with the id and balance (lpt) 3. Create the accessor and mutator methods for id, balance and interestRate (1pt) 4. Create three methods withdraw, deposit and closeAccount (1 pt) 5. Create a UML diagram for the Account class (3 pts) 6. Create AccountDemo (3 pts) a. Use the following values-id 1234, balance S4321 and an interest rate of 3.2%. b. Use the withdraw method to withdraw $3,210 c. Use the deposit method to deposit $2,345 d. Print the id and balance. e. Create a second id using user-supplied values. PolygonFun Class (15 pts) A polygon is a unique shape, where all the sides have both the same length as well as angles. Building on our designs for Rectangle and Triangle, we are going to create a class named PolygonFun and Polygon FunDemo. 1. The attributes of PolygonFun class are as follows: (1pt) a. int sides; I/ should be a default of 3 b. double sideLength; I/ should be a default of 1 c. double xCoordinate; I/ should be a default of 0 d. double yCoordinate;// should be a default of 0 2. Create three constructors (2 pts) A polygon with default values b. a. A polygon with a user-specified number of sides and length of sides with the xCoordinate and yCoordinate set to 0. A polygon with user-specified number of sides, length of sides, xCoordinate and yCoordinate c. 3. Create the accessor and mutator methods for sides, sideLength, xCoordinate, yCoordinate (2 pts) 4. Create two additional methods getPerimeter) and getArea (4 pts) 6. Create PolygonFunDemo- use all three constructors (step 2) (3 pts) 5. Create the UML diagram for the class (3 pts) area aiE N ie the number of sides TAN TE The angent function cacuiatedn degres e Trgonomaby Over Figare 1 - bttpuwwww.matbopeanC.com/pelyselerarea.hml Page 1 of 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!