Question

CSIT 210 n/bbcswebdav/pid-8544435-dt-content-rid-37523491_1 /courses/CSI T2 10.2 1 662.20192 1/Lab%206.pdf bat. Import bookma

rks now. PolygonFun Class (20 pts) A polygon is a unique shape, where all the sides have both the same length as well as angl

this program is in java (eclipse).

CSIT 210 n/bbcswebdav/pid-8544435-dt-content-rid-37523491_1 /courses/CSI T2 10.2 1 662.20192 1/Lab%206.pdf bat. Import bookmarks now Lab 6: Module 5- Classes Account Class (15 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 pt) a. long id;I should be a default of -1 b. double balance; I/ should be a default of $5 c. double interestRate; W should be a default of 0 2. Create two constructors- one with no arguments and the second with the id and balance (2pt) 3. Create the accessor and mutator methods for id, balance and interestRate (2pt) 4. Create three methods withdraw, deposit and closeAcount (2 pt) 5. Create a UML diagram for the Account class (4 pts) 6. Create AccountDemo (4 pts) a. b. c. d. Use the following values-id 1234, balance S4321 and an interest rate of 3.2%. Use the withdraw method to withdraw $3,210 Use the deposit method to deposit $2.345 Print the id and balance. PolygonFun Class (20 pts) A polygon is a unique shape, where all the sides have both the same length as well as angles. create a class named PolygonFun and PolygonFunDemo. We are going to 1. The attributes of PolygonFun class are as follows: (2pt) a. int sides; Il should be a default of3 b. double sideLength; should be a default of 1 c. double xCoordinate; I/ should be a default of d. double yCoordinate; I/ should be a default of 0 2. Create three constructors- (3 pts) a. A polygon with default values b. A polygon with a user-secified 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, side Length, xCoordinate, yCoordinate (3 pts) 4. Create two additional methods getPerimeter) and getArea (5 pts) 5. Create the UML diagram for the class (4 pts)
rks now. PolygonFun Class (20 pts) A polygon is a unique shape, where all the sides have both the same length as well as angles. We are going to create a class named PolygonFun and PolygonFunDemo. 1. The attributes of PolygonFun class are as follows: (2pt) a. int sides; I should be a default of 3 b. double sideLength; II should be a default of 1 c. double xCoordinate; I/ should be a default of 0 d. double yCoordinate; // should be a default of0 2. Create three constructors-(3 pts) a. A polygon with default values b. 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 (3 pts) 4. Create two additional methods getPerimeter) and getArea (5 pts) 5. Create the UML diagram for the class (4 pts) 6. Create PolygonFunDemo - use all three constructors (step 2) (3 pts) where S is the length of any side N is the number of sides TAN is lhe tangent function calculated in degrees (soe Trigoncmetry Ovarview area- ip
0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Study smarter, not harder.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • (Geometry: n-sided regular polygon) An n-sided regular polygon’s sides all have the same length and all...

    (Geometry: n-sided regular polygon) An n-sided regular polygon’s sides all have the same length and all of its angles have the same degree (i.e., the polygon is both equilateral and equiangular). Design a class named RegularPolygon that contains: ■ A private int data field named n that defines the number of sides in the polygon. ■ A private float data field named side that stores the length of the side. ■ A private float data field named x that defines...

  • Problem 2 9.9 Geometry: n-sided regular polygon pg. 362 (25 points) Follow instructions as provided on...

    Problem 2 9.9 Geometry: n-sided regular polygon pg. 362 (25 points) Follow instructions as provided on page 362, reprinted below 9.9 (Geometry: n-sided regular polygon) In an n-sided regular polygon, all sides have the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular) Design a class named RegularPolygon that contains A private int data field named n that defines the number of sides in the polygon with default value of 3 A...

  • (The Account class) Design a class named Account that contains: A private int data field named...

    (The Account class) Design a class named Account that contains: A private int data field named id for the account (default 0). 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 private Date data field named dateCreated that stores the date when the account was created. A no-arg constructor that creates a default...

  • JAVA PLEASE Create a class called Account with the following instance data Integer id Double balance...

    JAVA PLEASE Create a class called Account with the following instance data Integer id Double balance Provides the following methods Default constructor (defaults balance to 100) Constructor with parameters for the ID and the starting balance Accessor and mutator methods for id and balance Method to perform a withdrawal Method to perform a deposit Create a class called Bank which has an array of Account objects. This class will manage the accounts. It must provide methods Do withdrawal Do deposits...

  • Write a simple class representing a Polygon up to 6 sides: the Polygon class has 5...

    Write a simple class representing a Polygon up to 6 sides: the Polygon class has 5 fields: Regular, sides, sideLength, angle, apothem Polygon: Regular: boolean sides: int sideLength: double angle : double apothem : double Provide a no-arg constructor for this class initializes the object and sets the instance variables to: Regular: true sides: 3 sideLength: 1 angle : 60 apothem : SquareRoot(3)/2 Provide the following methods: Set number of sides set the length of the sides set the angle...

  • New to python if you can add screenshort also, i am using python 3 7.3 (The...

    New to python if you can add screenshort also, i am using python 3 7.3 (The Account class) Design a class named Account that contains A private int data field named id for the account. A private float data field named annualInterestRate that stores the current A constructor that creates an account with the specified id (default 0), initial The accessor and mutator methods for id, balance, and annualInterestRate A private float data field named balance for the account. interest...

  • //include comments Opts (Regular polygon) An n-sided regular polygon has n sides of the same length...

    //include comments Opts (Regular polygon) An n-sided regular polygon has n sides of the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular). Design a class named RegularPolygon that contains: Aprivate int data field named n that defines the number of sides in the polygon with default value 3. A private double data field named side that stores the length of the side with default value 1. A private double data field...

  • 9.7 (The Account class) Design a class named Account that contains: • A private int data...

    9.7 (The Account class) Design a class named Account that contains: • A private int data field named id for the account (default o). • A private double data field named balance for the account (default o). • A private double data field named annualInterestRate that stores the current interest rate (default o). Assume that all accounts have the same interest rate. • A private Date data field named dateCreated that stores the date when the account was created. •...

  • This is for java programming Please Show plenty of comments so I can follow the steps...

    This is for java programming Please Show plenty of comments so I can follow the steps Design a class named Account that contains: • A private int data field named id for the account (default 0) • 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 private Date data field named...

  • Create a UML diagram with 3 lines per class/interface including all constructors. public class Point {...

    Create a UML diagram with 3 lines per class/interface including all constructors. public class Point { public double X, Y; public Point() { this(0, 0); } public Point(double newX, double newY) { X = newX; Y = newY; } public static double distance(Point A, Point B) { return Math.sqrt(Math.pow(A.X-B.X, 2) + Math.pow(A.Y-B.Y, 2)); } } public interface Polygon { public int getNumberOfSides();    public double getPerimeter();    public double getArea();    } public abstract class Simple_polygon implements Polygon{ public Point...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT