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 2 out of 5 pages
Exam (elaborations)

IB Computer Science OOP Practice Exam Questions And Answers Rated A+.

Document preview thumbnail
Preview 2 out of 5 pages

What is the difference between an object and a class? - Answer an object is an instance of a class what is class decomposition? - Answer breaking a programming problem into multiple classes where each class has a specific task to perform in solving the problem. what are two characteristics of an object? - Answer - state (Variables) - behaviour (Methods) what does it mean to instantiate an object? - Answer using a class's constructor to create an instance of an object. in Java you use the keyword new. example: Student student = new Student("John", "Wayne"); what is a primitive data type and what are the 8 different ones? - Answer A value that is predefined by the language and is named to a reserved keyword - byte : 8 bit signed number variable - short : 16 bit signed number variable - int : 32 bit signed number variable - long : 64 bit signed number variable - float : 32 bit decimal value - double : 64 bit decimal value - boolean : true or false - char : single character

Content preview

IB Computer Science OOP Practice
Exam Questions And Answers Rated A+.
What is the difference between an object and a class? - Answer an object is an instance of a class



what is class decomposition? - Answer breaking a programming problem into multiple classes where
each class has a specific task to perform in solving the problem.



what are two characteristics of an object? - Answer - state (Variables)

- behaviour (Methods)



what does it mean to instantiate an object? - Answer using a class's constructor to create an instance
of an object.

in Java you use the keyword new.

example:

Student student = new Student("John", "Wayne");



what is a primitive data type and what are the 8 different ones? - Answer A value that is predefined by
the language and is named to a reserved keyword



- byte : 8 bit signed number variable

- short : 16 bit signed number variable

- int : 32 bit signed number variable

- long : 64 bit signed number variable

- float : 32 bit decimal value

- double : 64 bit decimal value

- boolean : true or false

- char : single character

, what is a parameter and what are the two types? - Answer a value that is passed to a method for it to
use.

formal and actual parameters



what is a formal parameter? - Answer parameters in the header of the method declaration are called
formal parameters and they are limited to the method they are declared in



what is an actual parameter? - Answer values passed into a method are called actual parameters or
arguments



what are advantages of object libraries? - Answer - code reusability

- complex algorithms do not need re-invention

- efficiency



what are disadvantages of OOP? - Answer - overly complex for simple problems

- tendency of over abstraction



what is aggregation? - Answer "has a" relationship between two classes where an object of one class
has an object of another.



example:

public class Classroom

{private Teacher teacher; // Classroom has a Teacher}



what are the advantages of modularity in program development? - Answer - productivity

- usability

- easily maintained

- code reusability



why should to dependencies between objects be reduced? - Answer because they decrease reusability

Document information

Uploaded on
January 31, 2025
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.59

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.
COCOSOLUTIONS
4.2
(37)
Sold
219
Followers
16
Items
9233
Last sold
1 week 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