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
Dell, previously the world’s number one PC manufacturer, has seen its market share shrink because of rivals copying its value ch
stepladder [879]

Answer:

A) underscore the importance of continually assessing a firm's strategic position among changing market conditions.

Explanation:

Dell computers believed their leadership position would last forever and forgot the basic rule that it is very hard to reach the top, but it's even harder to stay there.

The market conditions changed since globalization made the world smaller, increasing the potential customers but also increasing competition. Dell wasn't able to revise their strategic position and adapt it to changing markets. A company's strategic position refers to how its strategy deals with changing:

  • environments,
  • competition,
  • resources,
  • stakeholders' expectations.

The same thing happened to General Motors, that once used to be the largest and most profitable car manufacturer in the world, and then went bankrupt. It is still under a lot of financial stress and is continuously losing market share in the US and around the world.

5 0
4 years ago
Shortest Remaining Time First is the best preemptive scheduling algorithm that can be implemented in an Operating System.
Ierofanga [76]

Answer:

a

Explanation:

Yes, true.

Shortest Remaining Time First, also popularly referred to by the acronym SRTF, is a type of scheduling algorithm, used in operating systems. Other times it's not called by its name nor its acronym, it is called the preemptive version of SJF scheduling algorithm. The SJF scheduling algorithm is another type of scheduling algorithm.

The Shortest Remaining Time First has been touted by many to be faster than the SJF

7 0
3 years ago
What is the correct keyboard shortcut to cut a cell value
vladimir2022 [97]

Answer:

Cntrl+X

Explanation:

Do it on your computer

4 0
3 years ago
Write a JAVA program to generate the list of prime numbers between 100 and 1000 ?
Svetllana [295]

First of all, we will need a function that checks if a number is prime or not:

boolean isPrime(int n){

 for(int i=2; i<=math.sqrt(n); i++){

   if(n % i == 0) return false;

 }

 return true;

}

Then, in the main program, we will call this function with all the desired inputs, and we will print the prime numbers:

for(int n=100; n<= 1000; n++){

 if(isPrime(n)) print(n);

}

6 0
3 years ago
What is the minimum score for the dmv test?
Naddika [18.5K]
You can only get 6 wrong of the 30 questions.
3 0
4 years ago
Read 2 more answers
Other questions:
  • Imagine that you are an independent filmmaker making a feature-length narrative film in the United States, with a variety of bot
    11·2 answers
  • Which of the following allows you to view and access important information about your document all in one location?
    11·2 answers
  • Which of the following is NOT a Boolean Search term used to refine search engine results? A. AND B. With C. OR D. NOT
    14·2 answers
  • You and your project team have been asked to generate a solution to a problem. The problem is not complicated, and you are sure
    6·1 answer
  • What is the meaning of the concept (atomically)
    11·1 answer
  • What is individual components of a torch would need to function
    10·1 answer
  • If you have 128 oranges all the same size, color, and weight except one orange is heavier than the rest. Write down a C++ Code/A
    7·1 answer
  • Which is the correct code to declare a catch-all handler?
    13·1 answer
  • What is the grade, as a percentage with two digits after the decimal point, obtained when you graded this 101-question multiple-
    13·1 answer
  • Explain how mobile phone production could be more sustainable​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!