Javascript Beginner Boolean and Instantiation Assignment

Question is for specific assignment on CodeHS. Directions below: Overview: You will be creating a program that will classify whether a shape is a triangle, rectangle, or pentagon. If the shape is a triangle you will need to determine if it is an equilateral(all sides equal), issosoles(2 sides equal), or scalene(no sides equal). If the shape is a rectangle you will need to check to see if it is a square. If it is a pentagon you need to check to see if it is a regular pentagon (all sides equal). Side class: You can have some freedom here to figure out how you will determine the shape and the classification of the sides. You might want to overload the constructor to have one for each shape or maybe use some method with if statements. A shape should be classified based upon the most correct definition ( ex. if a pentagon has all five (5) sides equal, it needs to be classified as a regular pentagon not just a pentagon). Methods: You will need to have a toString method that will print out the information of the shape. Classifying it by its sides with its most specific name and listing the side lengths. Other methods you choose to make can vary depending on how you choose to determine shape and side relationships. Main: You will need to create an object (instantiate) for your side class for each of the following types of shapes: Equilateral triangle Isosceles triangle Scalene triangle Square Rectangle Regular Pentagon Pentagon Example Output: It’s is a(n) equilateral triangle with side lengths of: 2, 2, 2 It’s is a(n) isosceles triangle with side lengths of: 3, 3, 5 It’s is a(n) scalene triangle with side lengths of: 3, 4, 5 It’s is a(n) square with side lengths of: 3, 3, 3, 3 It’s is a(n) rectangle with side lengths of: 3, 3, 5, 5 It’s is a(n) regular pentagon with side lengths of: 2, 2, 2, 2, 2 It’s is a(n) pentagon with side lengths of: 3, 4, 4, 2, 5 It uses two files, MyProgram.java file and Side.java file. The MyProgram one is the one that'll run. I will provide logins.

Get Help With a similar task to - Javascript Beginner Boolean and Instantiation Assignment

Login to view and/or buy answers.. or post an answer

Related Questions

Similar orders to Javascript Beginner Boolean and Instantiation Assignment
24
Views
1
Answers
JavaScript Assignment
Assignment details in the Word file attached. I just need the files with the code, I will put them into the website myself....
105
Views
1
Answers
46
Views
1
Answers
C++ queue
Use C++ and implement your own queue using linked list that should be templated....
30
Views
1
Answers
creating a website
Description Use Notepad to create a web site about any subject that interests you. In a Mac use the app, Text Edit. The web site must consist of exactly two linked web pages that use the same external style sheet. (If this is not clear to you, please revi...