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
-Give a definition of the critical section problem and explain the purpose of the entry and exit code blocks
Alisiya [41]

Answer: In operating system a code segment which accesses  some shared variables or resources one at a time atomically such other no other code or process is accessing that resource or variable at the same time.

Entry section code block allows the access to the shared resource or variable and exit section code signals the termination from access to the shared resource or variable.

Explanation:

Entry and exit section codes needs to check certain properties before allowing the access and removal of access to a particular code segment.

These conditions are:

1. Bounded waiting.

2. Mutual exclusion.

3. checking thread execution status to allows other threads to enter the critical section (CS).

6 0
3 years ago
Compare the applications below:
alisha [4.7K]
Both can be the same thing
4 0
3 years ago
Read 2 more answers
A relative path name defines a path from_________________________ Select one: a. from the UFD (user file directory) b. the curre
lorasvet [3.4K]

Answer:

(b)  the current directory

Explanation:

A path is the location or route to a particular file or folder in an operating system. This path is always unique and can either be relative or absolute.

A relative path name of a file defines the path to the file from the current or present working directory.

An absolute path name of a file defines the path to the file from the root directory. This path gives a complete descriptive path to a file from the start of the actual file system of the operating system.

4 0
3 years ago
DLS1 is connected to another switch, DLS2, via a trunk link. A host that is connected to DLS1 is not able to communicate to a ho
zubka84 [21]

Answer:

Switchport does not compromise, switch auto dynamic mode, switch native vlan 66, default swamp vlan enabled to add 99 is the correct answer of the following question.

Explanation:

As configuring 802.1Q warp links, DLS1 is connected to the next switch, DLS2, via a diffusion connection to the local VLAN, that must match on the both sides of the wire, either CDP error signals will be created and data to or from the the original VLAN will not be managed properly.Such instruction must be extended to Fa0/1 on DLS1 to address issues that can not be communicated by a server related to DLS1 to a network tied to DLS1, even though both are in VLAN 99.

6 0
3 years ago
CPT, which is used to code procedures in an office, is an example of a/an
ExtremeBDS [4]
 <span>Current Procedural Terminology

is used for general check up

</span>
3 0
3 years ago
Other questions:
  • Dial-up connections can be made over a(n) ____ line or phone line. isdn dsl ipx tcp/ip
    12·1 answer
  • Universal Containers (UC) has a great user interface for their Customer Community Knowledge Base. UC has multiple Communities an
    15·1 answer
  • Cual es la definición de grouded ​
    7·2 answers
  • A user is trying to log into windows on her notebook computer. she enters the correct password for her user account, but the sys
    14·1 answer
  • I need help with this!!! PLEASE!!! Are headphones, radios, dishwashers, and remote controls considered Computers? Do any of them
    10·2 answers
  • Give your definition of a stored procedure. Based on the Academic Database, identify and describe a scenario where it would be n
    12·1 answer
  • CAN YOU PLEASE HELP WITH THIS DUE IN 10 MINUTES
    8·1 answer
  • Web design and development tools
    13·1 answer
  • You are an administrator of a growing network. You notice the network you have created is broadcasting, but you cannot ping syst
    7·1 answer
  • Real life example of hexadecimal and octal decimal “for example in binary light switch”
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!