1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
labwork [276]
3 years ago
8

Consider the following classes: public class Vehicle {...} public class Car extends Vehicle {...} public class SUV extends Car {

...} Self-Check Problems 617 Which of the following are legal statements? a. Vehicle v = new Car(); b. Vehicle v = new SUV(); c. Car c = new SUV(); d. SUV s = new SUV(); e. SUV s = new Car(); f. Car c = new Vehicle();
Computers and Technology
1 answer:
Kitty [74]3 years ago
7 0

Answer:

Legal statements:

      SUV s = new SUV();

      Car c = new SUV();

      Vehicle v = new SUV();

      Vehicle v1 = new Car();

illegal statements:

      SUV s1 = new Car();

      Car c1 = new Vehicle();

Explanation:

The options a, b, c, d are correct and legal statements because the syntax is correct, they follow the inheritance principles and therefore can be used for type cast.

The options e, f are incorrect and illegal statements because they do not follow the inheritance principles and therefore can not be used for type cast.

You might be interested in
What is profession explain with example​
WARRIOR [948]

Answer:   a profession is a job, or what you do for a living

example : a teacher is an example of proffesion

4 0
3 years ago
Read 2 more answers
How do i convert videos on the computer
mr Goodwill [35]

Answer:

An online tool or software.

Explanation:

Video conversion can be done using an online tool and software. If you choose to convert your videos by using an online tool, open any online tool and paste the link of the video or upload a video file from your computer, select the format you want and then click convert. Conversion takes a few seconds, and once the conversion is done, you can download the audio file. And if you choose to convert your videos by using the software, you have to download software, install it in your personal computer, and use it for conversion. In this process of transformation, you have to upload a video file from your computer. And if you do not need the output file format, some software can choose the setup automatically.

5 0
3 years ago
What area contains the command used to customize the print options in microsoft excel?
Nezavi [6.7K]
The answer is Page Layout Ribbon.  The <span>area contains the command used to customize the print options in microsoft excel is Page Layout Ribbon.</span>
4 0
3 years ago
In Bash, what commands can you use to view the contents of a document?
AlekseyPX

You can use the cat and less command to view the contents of a file.

hope this helps! :)

8 0
2 years ago
Which of the following is one of the first two levels of formatting in a Word document?
Dafna1 [17]

Explanation:

Paragraph Formatting.

5 0
3 years ago
Other questions:
  • LOOK TO THE LEFT AND RIGHT BEFORE ENTERING ANY INTERSECTION ON A GREEN LIGHT BECAUSE:
    12·2 answers
  • How to eject a flash drive from chromebook?
    6·1 answer
  • Demote the "Arrive and leave at the same time each day." List item, and then promote the "Respect" list item.
    6·1 answer
  • Which cost of purchasing a franchise would you still have if you start your own business​
    12·1 answer
  • n physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initia
    9·1 answer
  • Which of these files, when included in a program, will provide user assistance?
    5·2 answers
  • Plato Web Tech B Semester Test- I'll mark brainiest for answers to ALL
    9·1 answer
  • Write a function namedmake_complex that stores its twoarguments (both of type double) in acomplex structure, then returns thestr
    12·1 answer
  • Did brainly.com go down today? i coudlnt get in it
    15·2 answers
  • What is a word processing program? Give examples of word processing programs.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!