subject
Engineering, 08.11.2019 19:31 krystalScott17

Iused this program (nogo. java) for one of my cs2 java lab exercises. there are number of steps that you need to do along the way to collect points. the given nogo class has two abstract classes (nogo1, nogo2) and an empty static main() method. nogo. java has no compile error, and you can run nogo. java without runtime error. it does not display any messages. your task is to add codes along the following steps:
1) create instance variables for the two classes (nogo1, nogo2) and explain the outcome.
2) create a subclass gol with nogo1 as its parent and create a constructor that prints the "go1 ()" message
3) create an instance of go1 in run it, explain the outcome
4) in the nogo2 class, add an abstract method.
5) create a new class go9 that extends the nogo2 class and write a method that overrides the method that you created in step 4.
this new method displays "get x out of abstraction" where x is the method name. the constructor for g09( ) displays "g09( ". 6) in the main() method, add some codes to invoke the method x.
your final display should be:
nogo1()
go1()
goo()
get me()
out of abstraction
** me() is my method. yours should be different.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Amass of m 1.5 kg of steam is contained in a closed rigid container. initially the pressure and temperature of the steam are: p 1.5 mpa and t 240°c (superheated state), respectively. then the temperature drops to t2= 100°c as the result of heat transfer to the surroundings. determine: a) quality of the steam at the end of the process, b) heat transfer with the surroundings. for: p1.5 mpa and t 240°c: enthalpy of superheated vapour is 2900 kj/kg, specific volume of superheated vapour is 0. 1483 m/kg, while for t 100°c: enthalpy of saturated liquid water is 419kj/kg, specific volume of saturated liquid water is 0.001043m/kg, enthalpy of saturated vapour is 2676 kj/kg, specific volume of saturated vapour is 1.672 m/kg and pressure is 0.1 mpa.
Answers: 3
question
Engineering, 04.07.2019 18:20
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
Answers: 3
question
Engineering, 04.07.2019 19:10
The maximum shear stress and maximum flexural stress occur at the same location along a beam subjected to a non-uniform bending load. a)-trune b)- false
Answers: 2
question
Engineering, 04.07.2019 19:10
What is the chief metrological difference between measuring with a microscope and with an electronic comparator? a. the microscope is limited to small workpieces.a. the microscope is limited to small workpieces. c. the comparator can only examine one point on the workpiece. d. the microscope carries its own standard.
Answers: 1
You know the right answer?
Iused this program (nogo. java) for one of my cs2 java lab exercises. there are number of steps that...
Questions
question
Social Studies, 13.12.2021 17:50
question
Health, 13.12.2021 17:50
question
Mathematics, 13.12.2021 17:50
question
Mathematics, 13.12.2021 17:50
Questions on the website: 13722367