Skip to main content

← Computer Science syllabus

United StatesComputer Science

Unit 5: Writing Classes

10 dot points across 10 inquiry questions. Click any dot point for a focused answer with worked past exam questions where available.

How does an accessor method return an object's data, and what is the toString method?

What are the parts of a Java class, and how do instance variables, constructors and methods fit together?

How does a constructor initialise a new object's instance variables, and what happens if you omit one?

How do comments, preconditions and postconditions document a method's behavior?

What ethical and social responsibilities come with designing and using computing systems and data?

How does a mutator method change an object's state, and how can it validate the new value?

What is the scope of a local variable, and how do public and private control access to members?

How do static variables and methods belong to the class rather than to individual objects?

What does the this keyword refer to, and when do you need it inside a method or constructor?

How do you design a method with parameters and a return value, and how does it use the object's own data?