Question: CIT239 Java Programming Abstract Classes Lab Exercise 13a Due Date You must demonstrate the solution for this lab exercise to the instructor by Sunday, April

 CIT239 Java Programming Abstract Classes Lab Exercise 13a Due Date You

must demonstrate the solution for this lab exercise to the instructor by

CIT239 Java Programming Abstract Classes Lab Exercise 13a Due Date You must demonstrate the solution for this lab exercise to the instructor by Sunday, April 9, 2017, in order to receive credit for this work This lab is an adaptation of Programming Exercise 13.1 from the textbook. The "starter code" includes the sample code (from the textbook for the abstract Geometricobject class, as well as the textbook examples for the Circle and Rectangle classes. Programming Exercise Design and code a new Triangle class that extends the abstract Geometricobject class. The Triangle class should contain: Three double data fields named sidel, side2, and side3 with default values 1.0 to denote the sides of the triangle A no-arg constructor that creates a default triangle. A constructor that creates a triangle with the specified sidel, side2, and side3 values Accessor methods ("getter" methods for each of the three data fields A method named getArea that returns the area of this triangle A method named getPerimeter that returns the perimeter of this triangle A method named toString that returns a description of the triangle. Write a test program that prompts the user to enter three sides of the triangle, a color, and a Boolean value to indicate whether the triangle is filled. The program should display the area and perimeter values, as well as the color and true or false to indicated whether it is filled. The formula for the area of a triangle, given the three sides is: area SUS side 1)(s side2)(s side3) side1+side2 side where (That is, the value of S is one-half of the perimeter of the triangle The toString method can be implemented as follows: COverride public String to String return String format ("sidel S6.2f side 6.2f side 6.2f color ss, filled gb Sidel side2 side get Color is Filled CIT239-SU Lab13a Abstract Classes 20170326 docx 3/25/2017 2:24 PM

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!