Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java You have a class in your program called Animal that has methods for eat, sleep, and move. You need to create a Bird class,

Java

You have a class in your program called Animal that has methods for eat, sleep, and move. You need to create a Bird class, with a different implementation of the move method. What relationship should the Bird class have with the Animal class?

Question 4 options:

aggregation

inheritance

encapsulation

overloading

Question 5

What is the relationship between the Car and Engine classes shown below?

class Car { private String make; private String model; private int year; private Engine engine; }

public class Engine { private String manufacturer; private int numberOfCylinders; }

Question 5 options:

inheritance

aggregation

overriding

overloading

Question 6

Which of these is an example of auto unboxing?

Question 6 options:

int x = 5;

Integer y = x;

Integer x = new Integer(5);

ArrayList myList = new ArrayList();

myList.add(5);

ArrayList myList = new ArrayList();

myList.add(new Integer(5));

int x = myList.get(0);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions