Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

ITSC 1213 KNOWLEDGE CHECKPOINT 2 REVIEW QUESTIONS

Rating
-
Sold
-
Pages
13
Grade
A+
Uploaded on
23-07-2026
Written in
2025/2026

ITSC 1213 KNOWLEDGE CHECKPOINT 2 REVIEW QUESTIONS

Content preview

ITSC 1213 KNOWLEDGE CHECKPOINT 2 REVIEW
QUESTIONS

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.

Given the following class declarations and code, what is the result when the code is
run?
***
public class Car
{
private int fuel;
public Car() { fuel = 0; }
public Car(int g) { fuel = g; }
public void addFuel() { fuel++; }
public void display() { System.out.print(fuel + " ");
}
}
public class RaceCar extends Car
{
public RaceCar(int g)
{ super(2*g);
}
}

Car car = new Car(5);
Car fastCar = new RaceCar(5);
car.display() car.addFuel();
car.display();
fastCar.display();
fastCar.addFuel();
fastCar.display(); - Answers - The code compiles and runs with no errors, the output is:
5 6 10 11

If you don't specify the parent class in a class declaration which of the following is true?
- Answers - It inherits from the Object class.

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);

Given the following class definitions which of the following would not compile if it was
used in place of the missing code in the main method?
***

Parent Class
class Item
{
private int x;
public void setX(int theX)
{
x = theX;
}
// ... other methods not shown
}

Child Class
public class EnhancedItem extends Item
{
private int y;
public void setY(int theY)
{
y = theY;
}
// ... other methods not shown
public static void main(String[] args)
{
EnhancedItem currItem = new EnhancedItem();
// missing code

Document information

Uploaded on
July 23, 2026
Number of pages
13
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$14.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
QUEENS Harvard University
View profile
Follow You need to be logged in order to follow users or courses
Sold
228
Member since
4 year
Number of followers
180
Documents
4767
Last sold
4 days ago

4.1

61 reviews

5
35
4
10
3
8
2
3
1
5

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions