subject
Computers and Technology, 06.05.2020 00:08 punani

Write a Java program that meets the following requirements:

Create a class named Rock that acts as a superclass for rock samples collected and catalogued by a natural history museum. The Rock class contains fields for a number of samples, a description of the type of rock, and the weight of the rock in grams. Include a constructor that accepts parameters for the sample number and weight. The Rock constructor sets the description value to Unclassified. Include get methods for each field. Since you do not create any "Rock" objects make the Rock class abstract. Create three child classes named IgneousRock, SedimentaryRock, and MetamorphicRock. The constructors for these classes require parameters for the sample number and weight. Search the Web for a brief description of each rock type and assign it to the description field. Create an application that instantiates an object of each type and demonstrate that the methods work appropriately. Save the files as Rock. java, IgneousRock. java, SedimentaryRock. java, MetamorphicRock. java, and DemoRocks. java.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:10
Look at the far left lane in the picture. explain what the red car is doing and what it needs to do to travel safely.
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
Every telecommunication setup uses two devices: one device to transmit data and one device to receive data. which device transmits frequencies to mobile phones? towers transmit frequencies to mobile phones.
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Two students are discussing electricity that has a frequency of 60 hz. student a says that this type of electricity is referred to as ac. student b says that in this type of electricity, the electrons flow in only one direction. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
You know the right answer?
Write a Java program that meets the following requirements:

Create a class named Rock th...
Questions
question
Mathematics, 12.12.2020 16:20
question
Mathematics, 12.12.2020 16:20
question
Computers and Technology, 12.12.2020 16:20
question
Spanish, 12.12.2020 16:20
question
Mathematics, 12.12.2020 16:20
Questions on the website: 13722367