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 73 pages
Exam (elaborations)

CSE 205 COMPREHENSIVE STUDY GUIDE FULL QUESTIONS WITH ACCURATE SOLUTIONS

Document preview thumbnail
Preview 4 out of 73 pages

CSE 205 COMPREHENSIVE STUDY GUIDE FULL QUESTIONS WITH ACCURATE SOLUTIONS

Content preview

CSE 205 COMPREHENSIVE STUDY GUIDE
FULL QUESTIONS WITH ACCURATE
SOLUTIONS

●● The relationship between a class and an object is best described as


a) objects are instances of classes
b) classes are instances of objects
c) classes are programs while objects are variables
d) objects and classes are the same thing
e) objects are the instance data of classes
Answer: a) objects are instances of classes


●● To define a class that will represent a car, which of the following
definitions is most appropriate?


a) public class CAR
b) public class car
c) private class car
d) private class Car
e) public class Car
Answer: e) public class Car

,●● Which of the following reserved words in Java is used to create an
instance of a class?


a) new
b) public
c) public or private, either could be used
d) class
e) import
Answer: a) new


●● What does acronym API stands for?
a) Application Parameter Internet
b) Application Programming Interface
c) Apply Programming Interactive
d) Abstraction Programming Interface
Answer: b) Application Programming Interface


●● A class' constructor usually defines


a) how an object is initialized
b) how an object is interfaced

,c) if the instance data are accessible outside of the object directly
d) the number of methods in the class
e) the number of instance data in the class
Answer: a) how an object is initialized


●● Java methods can return only primitive types (int, double, float, char,
boolean, etc).


True
False
Answer: False


●● All Java classes must contain a main method which is the first
method executed when the Java class is called upon.


True
False
Answer: False


●● use the following class definition
import java.text.DecimalFormat;
public class Student
{ private String name;

, private String major;
private double gpa;
private int hours;
public Student(String newName, String newMajor, double newGPA, int
newHours)
{ name = newName;
major = newMajor;
gpa = newGPA;
hours = newHours;
}
public String toString( )
{ DecimalFormat df = new DecimalFormat("0.000");
return name + "\n" + major + "\n" + df.format(gpa) + "\n" + hours
}
}
Which of the following could be used to instantiate a new Student s1?


a) new Student(s1);
b) new Student s1 = ("Jane Doe", "Computer Science", 3.333, 33);
c) Student s1 = new Student("Jane Doe", "Computer Science", 3.333,
33);
d) Student s1 = new Student( );
e) s1 = new Student( );

Document information

Uploaded on
June 28, 2026
Number of pages
73
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
£10.56

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.
FocusFile7
3.9
(24)
Sold
231
Followers
3
Items
60822
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 exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed 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