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% (QA)
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
-
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...
-
1. Formulate a statistical hypothesis appropriate for the consumer groups purpose. 2. Calculate the mean average miles per gallon. Compute the sample variance and sample standard deviation. 3....
-
What are the consequences of an annulment for the parties? For their children?
-
Ross Electronics has one product in its ending inventory . Per unit data consist of the following: cost, $20; replacement cost, $18; selling price, $30; disposal costs, $4. The normal profit margin...
-
explain what forecasting is and its role in budgeting. Is forecasting a vital component of the budgeting process
-
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 major classifications of activities reported in the statement of cash flows are operating, investing, and financing. Classify each of the transactions listed below as: 1. Operating activityadd to...
-
Pichon Sports is expanding and needs $55 million to help fund this growth. The company estimates it can sell new shares of stock for $44 per share. The underwriters have agreed to a spread of 7...
-
1. Please draw UML class diagrams for the following constructs: a. interface: Institute b. classes: University, Department, Faculty, Student, Undergraduate, Graduate, Graduate Assistant, Course,...
-
A 15-year-old girl in a coma was brought to the emergency room by her parents. She had diabetes and has been insulin dependent for 7 years. Her parents stated that there have been several episodes of...
-
Identify three causes of Hardware Shack employees being unmotivated. Make recommendations to solve each of these problems. Make an implementation plan for Thanasi to use your recommendations. This...
-
The listing price is $5,500,000. The property produces $387,000 each year in net operating income (NOI) that is expected to increase by 3% each year over the next 5 years. The bank will make a loan...
-
Assuming that total revenues were $10,400 and total expenses were $6,000, prepare the entry in journal form to close the Income Summary account to the R. Shah, Capital account. The accounting period...
-
Heineken N.V., a global brewer based in the Netherlands, reports the following balance sheet accounts for the year ended December 31, 2016 (euros in millions). Prepare the balance sheet for this...
-
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.
-
In the later year, prices are $1.50 per treat, $150 per dog house, and $7.50 per leash. What is nominal GDP? What is the GDP Deflator?
-
5. For this problem, direct calculations are not necessary; you are in- tended to use the graoh. 20 points total. Consider a consumer with the following preferences: AGAN NO 60 55 50 45 40 35 30 75...
-
As the 1980s drew to a close, it is probably true to say that behavioural economics was on a firm footing and certainly a growing field. Briefly summarise developments since 1990 AND find a recent...
Study smarter with the SolutionInn App