subject

Add three instance variables to your class RightTriangle from lab 5. The first two are of type int and are called xLoc and yLoc and the third is of type int called ID. Also add a static variable of type double called scaleFactor. This should be initialized to a default value of 1. Update the constructor to set the three new instance variables and add appropriate get and set methods for the four new variables. All set methods including those from lab 5 should verify that no invalid data is set. Also define a new method ScaleShape() which multiplies the base and height instance variables by the scaleFactor and then updates the hypotenuse.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
The blank is type of decision-maker who over analyzes information
Answers: 3
question
Computers and Technology, 22.06.2019 02:30
The can be used to paste text in any order
Answers: 1
question
Computers and Technology, 22.06.2019 12:10
1. declare a constant named cents_per_pound and initialize with 25. 2. get the shipping weight from user input storing the weight into shipweightpounds. 3. using flat_fee_cents and cents_per_pound constants, assign shipcostcents with the cost of shipping a package weighing shipweightpounds.
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
How do you write an argumentative essay about the importance of free enterprise ?
Answers: 1
You know the right answer?
Add three instance variables to your class RightTriangle from lab 5. The first two are of type int a...
Questions
question
Social Studies, 22.02.2020 05:12
question
Health, 22.02.2020 05:16
question
Mathematics, 22.02.2020 05:16
Questions on the website: 13722362