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
andrew-mc [135]
2 years ago
12

Consider the classes Food, Cheese, and Velveeta where Cheese is a subclass of Food and Velveeta is a subclass of Cheese. State w

hich of the following lines of code are legal.
Cheese c =new Food( );
Velveeta v =new Food( );
Cheese c =new Velveeta( );
Food f =new Velveeta( );
Food f =new Cheese( );
Computers and Technology
1 answer:
il63 [147K]2 years ago
6 0

Answer:

Cheese c =new Velveeta( );

Food f =new Velveeta( );

Food f =new Cheese( );

Explanation:

The super-class is the parent class from which features and attributes are inherited from while the subclass or the child class is the class inheriting from the super or parent class.

In Java, the object instance of a class is created with the syntax;

class_name instance_name = new class_name();

Food is the super or parent class of Cheese (which makes Cheese its subclass) and Cheese is the parent class of Velveeta. The extends keyword is used to denote inheritance.

You might be interested in
Where do players resurrect if they have been destroyed in a game?
CaHeK987 [17]

Usually back to their start point. Or a random place on the map.

3 0
3 years ago
What is Groovefunnels?
Andreyy89

GrooveFunnels is a game-changer and it’s disrupting the market quite a bit.
5 0
3 years ago
Read 2 more answers
Many company websites are now designed to do more than just sell a product. These​ websites, known as​ __________ websites, atte
Zinaida [17]

Answer:

brand community

Explanation:

Many company websites are now designed to do more than just sell a product. These​ websites, known as​ brand community websites, attempt to build closer customer relationships and generate engagement with and between the brand and its customers. These online communities bring together consumers who have shared interests in a brand or product. One advantage of online brand communities is that they reduce customer support costs as the business has more engagement with their customers.This also helps the business to retain customers through brand improvement centered around the customer's actual needs.

5 0
3 years ago
____________________deals with syntax and semantics ofinformation exchange.
Goshia [24]

Answer:

The answer is (a).Presentation Layer

Explanation:

This layer is located at the 6th level of the OSI model, responsible for delivering and formatting the information to the upper layer for further processing. This service is needed because different types of computer uses different data representation. The presentation layer handles issues related to data presentation and transport, including encryption,translation and compression.

3 0
2 years ago
Discuss the inte Generation of computer, Inlith
ch4aika [34]

Generations of Computers

The computers of today find their roots in the second half of the twentieth century. Later as time progressed, we saw many technological improvements in physics and electronics. This has eventually led to revolutionary developments in the hardware and software of computers. In other words, soon the computer started to evolve. Each such technological advancement marks a generation of computers.

3 0
3 years ago
Other questions:
  • Disk requests come in to the disk driver for cylinders 10, 22, 20, 2, 40, 6, and 38, in that order. A seek takes 6 msec per cyli
    6·1 answer
  • What in the LAN for a small office, some user devices connect to the LAN using a cable, while others connect using wireless tech
    14·1 answer
  • Video-sharing sites such as youtube and vimeo provide a place to post short videos called clips, true or false?
    10·1 answer
  • /*Implement a class Address . An address has a house number, a street, an optional
    5·1 answer
  • Does Buzz or APEX shows all your due assignments on the left of the main home screen?
    11·1 answer
  • Which element of a presentation program’s interface displays the slide you are currently creating or editing?
    14·2 answers
  • What is the missing line of code?
    7·2 answers
  • Briefly describe the traditional definition of the digital divide. What is it and who is affected, positively and adversely? How
    15·1 answer
  • We begin with a computer implemented in a single-cycle implementation. When the stages are split by functionality, the stages do
    13·1 answer
  • . prevalence of coronary artery disease in patients with isolated aortic valve stenosis. br heart j. 1984;51:121–4.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!