subject

Consider the classes Food, Cheese, and Velveeta where Cheese is a subclass of Food and Velveeta is a subclass of Cheese. State which 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( );

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
What is the term for water wave that is created by an underwater earthquake
Answers: 1
question
Computers and Technology, 24.06.2019 08:20
Which type of entity describes a fundamental business aspect of a database? a. linking b. lookup c. domain d. weak
Answers: 3
question
Computers and Technology, 24.06.2019 10:00
Which feature of a blog to restore and retrieve older post
Answers: 3
question
Computers and Technology, 24.06.2019 12:00
How can we take picture in this app
Answers: 1
You know the right answer?
Consider the classes Food, Cheese, and Velveeta where Cheese is a subclass of Food and Velveeta is a...
Questions
question
Mathematics, 17.10.2020 19:01
question
Spanish, 17.10.2020 19:01
question
Mathematics, 17.10.2020 19:01
Questions on the website: 13722363