What is the output of the Rocket program? A. 2,5 B. 3,4 C. 5,2 D. 3,5 E.
Question:
What is the output of the Rocket program?
A. 2,5
B. 3,4
C. 5,2
D. 3,5
E. The code does not compile.
F. None of the above.
Transcribed Image Text:
} package transport; class Ship { } protected int weight = 3; private int height = 5; public int getWeight() { return weight; } public int getHeight() { return height; } public class Rocket extends Ship { public int weight = 2; public int height = 4; public void print Details() { System.out.print(super.getWeight ()+", "+ super.height); } public static final void main(String[] fuel) { new Rocket() .printDetails(); }
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (1 review)
The provided code is a Java program with two classes Ship and Rocket where Rocket extends Ship The R...View the full answer
Answered By
ANDREW KIPRUTO
Academic Writing Expert
I have over 7 years of research and application experience. I am trained and licensed to provide expertise in IT information, computer sciences related topics and other units like chemistry, Business, law, biology, biochemistry, and genetics. I'm a network and IT admin with +8 years of experience in all kind of environments.
I can help you in the following areas:
Networking
- Ethernet, Wireless Airmax and 802.11, fiber networks on GPON/GEPON and WDM
- Protocols and IP Services: VLANs, LACP, ACLs, VPNs, OSPF, BGP, RADIUS, PPPoE, DNS, Proxies, SNMP
- Vendors: MikroTik, Ubiquiti, Cisco, Juniper, HP, Dell, DrayTek, SMC, Zyxel, Furukawa Electric, and many more
- Monitoring Systems: PRTG, Zabbix, Whatsup Gold, TheDude, RRDtoo
Always available for new projects! Contact me for any inquiries
4.30+
1+ Reviews
10+ Question Solved
Related Book For
OCP Oracle Certified Professional Java SE 11 Developer Practice Tests Exam 1Z0 819 And Upgrade Exam 1Z0 817
ISBN: 9781119696131
1st Edition
Authors: Scott Selikoff, Jeanne Boyarsky
Question Posted:
Students also viewed these Computer science questions
-
Advanced Cleaning Services was an incorporated company offering cleaning services. It negotiated and signed contracts with clients and managed the business but hired cleaners to do the actual...
-
Custom Cabinetry has one job in process (Job 120) as of June 30; at that time, its job cost sheet reports direct materials of $8,500, direct labor of $4,400, and applied overhead of $3,740. Custom...
-
How does bhm.xml file include other hbm.xml files? (a) (b) (c) (d) None of the above
-
Let B > 0. Show that the maximum of (x 1 , . . . , x n ) = x 1 + + x n subject to x 2 1 + + x 2 n = B 2 is nB. Conclude that for all numbers a,..., an lal++lanl n(a + + a) / 1/2
-
Evaluate each of the following processes applied to cyclononatetraene, and decide whether the species formed is aromatic or not: (a) Addition of one more electron, to give C9H10 (b) Addition of two...
-
A plane electromagnetic wave propagates in a medium moving with constant velocity V < < c relative to an inertial frame K. Find the velocity of that wave in the frame K if the refractive index of the...
-
How do the accelerated and straight-line depreciation methods differ?(Appendix)
-
OnDecember 31 2007, Karmansky Company needed to record its accrued wages for year-end. December 31 is a Tues, and Karmasky Company must account for two days of wages. The company operates on a...
-
Oregon Springs Company has 6 % , 1 0 - year bonds payable that mature on June 3 0 , 2 0 3 4 . The bonds are issued on June 3 0 , 2 0 2 4 , and Oregon Springs pays interest each June 3 0 and December...
-
Imagine you are working with another team to build an application. You are developing code that uses a class that the other team has not finished writing yet. You want to allow easy integration once...
-
What is the output of the following application? A. 1 1 2 B. 5 2 2 C. 5 2 1 D. 6 2 2 E. 6 2 1 F. The code does not compile. package world; public class Matrix { private int level = 1; class Deep {...
-
The cost formula for the maintenance department of Rambo Ltd. is $9,700 per month plus $3.85 per machine hour used by the production department. Required: a. Calculate the maintenance cost that would...
-
Consider the two different project types below. For each project type, consider which areas of the Cost Management Plan would be most important, and explain your rationale for each in the space...
-
As set out in the company's organisational processes, you are also required to develop contingency plans to ensure that any risks to the success of goals of the operational plan are identified and...
-
que tecnicas y estrategias podemos usar para un plan de relanzamiento de la marca kellogs rice krispies?
-
This is not considered sexual abuse because there was no action on the caretaker's part. You could inform the parents that the child told you about viewing pornography in their home. Schedule a time...
-
Explain what farm-to-plate/table is to you. How does it positively affect our environment and economy? What do you do to try to be more farm-to-plate? Does a restaurant advertising Farm-to-plate draw...
-
How could one assess the quality of a governments financial reporting?
-
A stock has had returns of 8 percent, 26 percent, 14 percent, 17 percent, 31 percent, and 1 percent over the last six years. What are the arithmetic and geometric average returns for the stock?
-
Modify the CreditCard class from Code Fragment 1.5 so that it ignores any request to process a negative payment amount.
-
Modify the declaration of the first for loop in the main method in Code Fragment 1.6 so that its charges will cause exactly one of the three credit cards to attempt to go over its credit limit. Which...
-
Write a short Java method that takes an array of int values and determines if there is a pair of distinct elements of the array whose product is even.
-
QUESTION 1 ( 1 5 0 MARKS ) Ubuntu ( Ltd ) ( hereafter Ubuntu ) is a printing and advertising company that is listed on the Johannesburg Stock Exchange ( hereafter JSE ) . Ubuntu generates revenue...
-
The chart of accounts: equipment identify as subsidiary account specific account major account categories primary sub - account
-
The Russell Company provides the following standard cost data per unit of product: \ table [ [ Direct material ( 3 gallons @ $ 4 per gallon ) , $ 1 2 . 0 0
Study smarter with the SolutionInn App