Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1Object name: Student | AThe attributes have no data types listed. Each attribute needs a type, such as studentName (String) and yearLevel (Integer). | |
| 2Methods: calculateAverage(marks) - returns the mean mark | BAttributes: studentName (String), yearLevel (Integer) | |
| 3Each attribute in an object description is listed with its name and its data type. | CThe methods section is missing. The description should list methods such as getTitle() with their parameters and purpose. | |
| 4An object description differs from a data dictionary because it also lists the methods the object can perform. | DNames the class or object being described, such as Student, at the top of the object description. | |
| 5Object name: Student Attributes: studentName, yearLevel | ELists a behaviour of the object with its parameters and a short statement of what it does. | |
| 6Object name: Book Attributes: title (String), pages (Integer) Methods: (none listed) | FMethods: setYearLevel(newLevel) - changes the year level |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
object description — A design table for a class that lists its name, its attributes with data types, and its methods with their parameters and purpose.Object name: Student
Attribute: studentName (String)Object name: Product
Attribute: price (Float)Object name: Book
Attribute: isBorrowed (Boolean)Object name: Student
Method: addPoints(points)
Purpose: adds to the points attributeObject name: Account
Attribute: balance (Float)
Method: deposit(amount)