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 the meaning of antimonographycationalis​
Oliga [24]

Answer:

Although this word was made up in order to be a contender for the longest word in English, it can be broken down into smaller chunks in order to understand it.

Anti- means that you are against something; monopoly means the exclusive control over something; geographic is related to geography; and the remaining part has to do with nationalism.

So this word means something like 'a nationalistic feeling of being against geographic monopoly,' but you can see that it doesn't have much sense.

(answer copied from  Kalahira just to save time)

3 0
3 years ago
Read 2 more answers
A general rule for adding text to a slide is ____.
Rama09 [41]

A general rule for adding text to a slide is to use not more than two fonts in a presentation and vary the font size. Furthermore, to make a slide legible, in addition to the point size, attention must be paid to the word count per slide, the choice of typeface, and the visual balance of  space to text.

4 0
3 years ago
Read 2 more answers
Write a function call it isEvenPositiveInt which takes an integer x and return true if x is positive and also even. Note isinsta
Anna11 [10]

Answer:

The program to this question as follows:

Program:

def isEvenPositiveInt(x): #defining method isEvenPositiveInt

   if x>0: #checking number is positive or not

       if x%2==0: #check true condition

           return True #return value True

       else:

           return False #return value False

   return False #return value False

print(isEvenPositiveInt(24)) #calling method and print return value

print(isEvenPositiveInt(-24)) #calling method and print return value

print(isEvenPositiveInt(23)) #calling method and print return value

Output:

True

False

False

Explanation:

In the above Python program, a method "isEvenPositiveInt" is defined, that accepts a variable "x" as its parameter, inside the method a conditional statement is used, which can be described as follows:

  • In the if block the condition "x>0" is passed, that check value is positive, if this condition is true, it will go to another if block.
  • In another, if block is defined, that checks the inserted value is even or not, if the value is even it will return "true", otherwise it will go to the else part, that returns "false".  
5 0
3 years ago
Attacking systems by exploiting otherwise unknown and unpatched vulnerabilities is also known as:
Nostrana [21]

Answer:

Zero-day exploits

Explanation:

Zero-day exploits refers to recently found vulnerabilities in a computer software program that has been in existence but was hitherto not known and addressed by the software security experts, however, these vulnerabilities were known to hackers. While the existence of these "loop-holes" in the software can go on unnoticed for several years, hackers can take advantage of it to cause harm to the computers' programs and data.

When these attacks occur, it is called a zero-day because the attack took place on the very day that the loop-hole was discovered in the software. So exploitation has already taken place before a fix is carried out.

5 0
3 years ago
Aaron opens a bicycle store. Which of the
LenKa [72]

Answer: Aaron hired an employee to do bicycle repairs

Explanation:

Labor refers to the physical and mental effort put into production by human beings.

Since Aaron opens a bicycle store, he can hire an employee to do bicycle repairs. Therefore, in this case, labor will be put into productive use for the company.

3 0
3 years ago
Other questions:
  • Blogs are typically written by large companies or organizations as a way to express formal, technical, or scholarly information
    5·2 answers
  • Jabari is writing a program which prompts a user for a value with a decimal. Which function should he use? float() int() print()
    9·2 answers
  • Having a conversation with someone using a cellular phone is an example of _________ transmission. simplex full-duplex half-dupl
    11·1 answer
  • Which of the following is NOT considered a step in the problem solving process. A Try B Discover C Prepare D Define
    12·1 answer
  • What major criteria must a product or process meet in order to be considered emerging technology?
    7·1 answer
  • Public class Student {
    14·1 answer
  • Grab the stniop or they will dissapear
    12·1 answer
  • What connections do you see between variables and what you learned about the Input-Output-Store-Process model of a computer?
    11·1 answer
  • 1. A cell is identified by its ........
    8·1 answer
  • How does the dns help the world wide web scale so that billions of users can access billions of web pages?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!