subject

Create an abstract base class called Shape and move the static variable scaleFactor and the three instance variables id, xLoc and yLoc from RightTriangle to Shape along with the get and set methods for those variables. Implement a Shape constructor and update the RightTriangle constructor to call the Shape constructor for the variables moved to Shape. Then add three abstract methods to Shape called getArea(), getPerimeter() and scaleShape(). Define three classes that extend Shape called Circle, Rectangle and RightTriangle. Much of RightTriangle can be copied from Lab 7, and much of Circle and Rectangle from the slides and in class work. For each class define the needed instance variables and an appropriate constructor to initializes those instance variables and call the Shape constructor for the instance variables defined on Shape, and then override the four abstract methods defined on Shape. Write an application which shows the user the following menu and implements all options. The program should continue to run and process requests until the user chooses to exit. The program should double-check that the user really wants to exit. You may use a limit of 10 possible shapes to simplify implementation. All input must be validated and appropriate feedback given for invalid input.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
Today is the anniversary of me being on yet, i don't need it anymore! here's a picture of my dog wearing a bowtie! my question is, how do i delete my account?
Answers: 1
question
Computers and Technology, 22.06.2019 23:50
You need to design a circuit that implements the functions in the following table: s0 s1 function0 0 a + 10 1 a – b1 0 a + b1 1 a – 1s0 and s1 are 1-bit control inputs to select the function of the circuit. inputs a and b are 4-bitnumbers in 2s complement form. the output is also a 4-bit number in 2s complement form.you are allowed to use only one ttl 7483 4-bit adder to implement all the functions. but anynumber of other components (except the adder) can be used.hint: design a combinational logic circuit to modify the input b and the “carry input” of theadder depending on the control inputs s0 and s1.important: lab grade will depend on the working of the circuit & will be checked of by your labinstructor.1. is the output valid for the following input combinations: a. s0 = 0, s1 = 0, a = 7, b = 3? b. s0 = 0, s1 = 1, a = 7, b = 3? c. s0 = 1, s1 = 0, a = -4, b = -5? d. s0 = 1, s1 = 1, a = -8, b = 6? 2. what is the range of inputs (for both a and b) that will produce the valid output for all the functions?
Answers: 3
question
Computers and Technology, 23.06.2019 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
question
Computers and Technology, 24.06.2019 00:20
The guy wire bd exerts on the telephone pole ac a force p directed along bd. knowing the p must have a 720-n component perpendicular to the pole ac, determine the magnitude of force p and its component along line ac.
Answers: 2
You know the right answer?
Create an abstract base class called Shape and move the static variable scaleFactor and the three in...
Questions
question
Mathematics, 05.01.2020 03:31
question
English, 05.01.2020 03:31
Questions on the website: 13722363