Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SPRING 2017 CS 231. Programming Il. Page 1 of 4 Testa 3 Dr. Badi, A. April 27, 2017 105 minutes 100 Name: Grade This is

image text in transcribed
image text in transcribed
SPRING 2017 CS 231. Programming Il. Page 1 of 4 Testa 3 Dr. Badi, A. April 27, 2017 105 minutes 100 Name: Grade This is an open book and open notes programming test Answer all questions For partial credit, show your work, Q1) pointsi The figure below shows the Solarobiect class hierarchy.Thisclassis the parent of the classes described below: (abstract) long getRadius double getDistance From hesun Rotate (interface) Planet Revolve (interface) string get DayLength int get Numberof Moons String get YearLength String get ParentPlanet The Solarobject class is abstract and defines two nen:abstractfunctions: long getRadius o and double get Distance FromThesun o, as shown in the figure above. The Planet class is a non:abstract child of solarobject and defines one functions: int getNumberofMoons 0,as shown in the figure. In addition, the Planet class implements two interfaces. Revolve, and Rotate. The Revolve interface defines a single function: string getrearLength (),as in the figure. The Rotate interface defines a single function: string getDayLength as in the figure. The Planet class has one child, Moon The Moon class is d defines one functions: String get Parent Planet o, as shown in the figure From the description, above, complete the following

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions