Rédigé par des étudiants ayant réussi Disponible immédiatement après paiement Lire en ligne ou en PDF Mauvais document ? Échangez-le gratuitement 4,6 TrustPilot
logo-home
Examen

ITSC 1213 EXAM 2 QUESTIONS AND CORRECT ANSWERS

Note
-
Vendu
-
Pages
8
Grade
A+
Publié le
23-07-2026
Écrit en
2025/2026

ITSC 1213 EXAM 2 QUESTIONS AND CORRECT ANSWERS

Aperçu du contenu

ITSC 1213 EXAM 2 QUESTIONS AND CORRECT
ANSWERS


Shirt inherits Clothing. Clothing has the fold()method, but Shirt does not. Which fold() is
executed in the following code?

Shirt myShirt = new Shirt();
myShirt.fold(); - Answers - The clothing version --> As the Shirt inherits Clothing so the
object of the Shirt class can call the method of Clothing

A bookstore is working on an on-line ordering system. For each type of published
material (books, movies, audio tapes) they need to track the id, title, author(s), date
published, and price.
Which of the following would be the best design? - Answers - Create the class
PublishedMaterial with children classes of Book, Movie, and AudioTape.

Below is the parent class Person:

public class Person { private String name = null;

public Person(String theName)
{
name = theName;
}

public String getFood()
{
return "Hamburger";
}
}

Which of the following method signatures in Student would correctly override the
getFood method in Person? - Answers - public String getFood()

Given the following class declarations and initializations in a client program, which of the
following is a correct call to method1?
public class Test1 {
public void method1(Test2 v1, Test3 v2) {
// rest of method not shown } }
public class Test2 extends Test1 { }
public class Test3 extends Test2 { }
The following initializations appear in a different class.

, Test1 t1 = new Test1();
Test2 t2 = new Test2();
Test3 t3 = new Test3(); - Answers - t3.method1(t3,t3);

The class Shirt extends the Clothing class. To make the class DressShirt inherit the
functionality of both Clothing and Shirt its class header would be: - Answers - public
class DressShirt extends Shirt

Which of the following is true regarding abstract classes or abstract methods? (Select
all that apply) - Answers - Abstract classes only become useful when they are extended.
Abstract methods must be overriden

An online store is working on an online ordering system for Books and Movies. For each
type of Published Material (books and movies) they need to track the id, title, date
published, and price. Which of the following would be the best design? - Answers -
Create the class PublishedMaterial and have Book and Movie inherit from it all the listed
attributes.

Below is the class Greeter and its method, greet:

public class Greeter{
public String greet() {
return "Hi"; }}

Which of the following are the correct way to create a subclass called MeanGreeter and
implement the overridden greet method of the child class so that it returns "Go Away"?
(Select all that apply) - Answers - class MeanGreeter extends Greeter
{
public String greet()
{
return "Go Away";
}
}

Under which of these conditions overloading a method would work (ie: the class will
contain two methods with the same name)? - Answers - The methods have different
numbers of parameters.

If you have a parent class Animal that has a method speak() which returns: Awk. Cat
has a speak method that returns: Meow. Bird does not have a speak method. Dog has a
speak method that returns: Woof. Pig does not have a speak method. Cow has a speak
method that returns: Moo. What is the output from looping through the array a created
below and asking each element to speak()?

École, étude et sujet

Infos sur le Document

Publié le
23 juillet 2026
Nombre de pages
8
Écrit en
2025/2026
Type
Examen
Contient
Questions et réponses

Sujets

$13.99
Accéder à l'intégralité du document:

Mauvais document ? Échangez-le gratuitement Dans les 14 jours suivant votre achat et avant le téléchargement, vous pouvez choisir un autre document. Vous pouvez simplement dépenser le montant à nouveau.
Rédigé par des étudiants ayant réussi
Disponible immédiatement après paiement
Lire en ligne ou en PDF

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
QUEENS Harvard University
Voir profil
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
228
Membre depuis
4 année
Nombre de followers
180
Documents
4767
Dernière vente
5 jours de cela

4.1

61 revues

5
35
4
10
3
8
2
3
1
5

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Vous travaillez sur vos références ?

Créez des citations précises en APA, MLA et Harvard avec notre générateur de sources gratuit.

Vous travaillez sur vos références ?

Foire aux questions