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
Document preview thumbnail
Preview 4 out of 56 pages
Exam (elaborations)

CSCI 2010 – Quiz 1 | Practice Questions, Answers & Study Guide

Document preview thumbnail
Preview 4 out of 56 pages

Prepare for CSCI 2010 Quiz 1 with practice questions, answers, study materials, and exam review covering essential computer science concepts.

Content preview

CSCI 2010 - Quiz 1 2026.




Only one constructor may be defined per class. False


What is a method? A member of a class that defines an operation on an object.


A classed called Printer has a method called printPage(4);
printDocument. This calls a void method in the Printer
class called printPage that takes an integer
representing the page number as an argument. How
should printDocument call printPage with an argument
of 4?


Given a class called Rectangle with a constructor that Rectangle rect = new Rectangle(8.2, 3.5);
takes two doubles as arguments representing the
dimensions, which of the following is the correct way
to invoke that constructor?




3/21/2026, 8:55:01 PM 3/21/2026, 8:55:03 PM 3/21/2026, 8:54:57 PM

, CSCI 2010 - Quiz 1 2026.




Consider the following code: emp1 refers to the object with the name Anna Karenina. emp2 refers to the
same object.
Employee emp1 = new Employee();
emp1.setName("Anna Karenina");
Employee emp2 = new Employee();
emp2.setName("David Copperfield"):
emp2 = emp1;


Which of the following best describes the contents of
the two variables emp1 and emp2 after this code has
executed?


Given the following method header: public double computeArea(double length)


public double computeArea(double length, double
width)


Which of the following would be a legal overloaded
method in the same class?




3/21/2026, 8:55:01 PM 3/21/2026, 8:55:03 PM 3/21/2026, 8:54:57 PM

, CSCI 2010 - Quiz 1 2026.




When calling a method from another method in the True
same class, the form methodName() is equivalent to
this.methodName().


Regular methods may be overloaded, but a False
constructor may not be overloaded.


All methods must return a value. False


What is the difference between a static variable and A static variable is shared by all objects of a class. Every object has its own
an instance variable? version of an instance variable.


What is decompostion? A design strategy that breaks a task down into several subtasks.


What is the difference between an accessor method An accessor method returns data contained in an instance variable. A mutator
(or getter) and a mutator method (or setter)? method modifies data contained in an instance variable.




3/21/2026, 8:55:01 PM 3/21/2026, 8:55:03 PM 3/21/2026, 8:54:57 PM

, CSCI 2010 - Quiz 3 2026.




How is the inheritance relationship represented in a By an arrow pointing from the derived class to the base class.
UML diagram?


Assume that Mammal is a subclass of Animal and Dog dog = animal;
is a subclass of Mammal.


Given the following declarations:


Animal animal;
Mammal mammal;
Dog dog;


Which of the following statements is not legal?




3/21/2026, 8:55:01 PM 3/21/2026, 8:55:03 PM 3/21/2026, 8:54:57 PM

Document information

Uploaded on
August 19, 2026
Number of pages
56
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

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

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.
aplusgrade0
4.5
(2)
Sold
1757
Followers
2
Items
527
Last sold
10 hours ago




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