A B C D E G L M P R S T U 
All Classes All Packages

A

addBook(String, String, double) - Method in class Program4
(b) [17 marks] Complete the addBook(...) method so that it will create a book with the title, author, and rating specified in the parameters, and then add the book to the collection if and only if: - The rating is valid (between 0 and 5 inclusive) - A book with that title is not already in the collection The method should return true if the book was successfully added, or false otherwise.
averageArray() - Method in class Program1
(c) Complete this method so that it calculates the average of all the numbers in the nums array.

B

Book - Class in <Unnamed>
A class that represents books.
Book(String, String, double) - Constructor for class Book
Creates a new book with the given title, author, and rating
Box - Class in <Unnamed>
Complete this class to specify Box objects that are used by the simulation in Program2.
Box(double, double, Color) - Constructor for class Box
Constructor to create a Box.

C

checkRowsContinuous() - Method in class Program5
(b) [15 marks] Complete the checkRowsContinuous() method so that it counts the number of *continuous* filled squares in each row, and checks that the count matches the value stored in rowCounts for that row.
checkRowsSimple() - Method in class Program5
(a) [8 marks] Complete the checkRowCountsSimple() method so that it counts the number of filled squares in each row, and checks that the count matches the value stored in rowCounts for that row.
Circle - Class in <Unnamed>
A circle that can be drawn on the UI, and can grow and shrink.
Circle(double, double, double, Color) - Constructor for class Circle
Constructor for a circle.
countPositives() - Method in class Program1
(d) Complete this method so that it counts and prints the number of positive values that appear in the ArrayList of Doubles stored in nums.
createTestData() - Method in class Program4
This method will add some data to the Schedule field so you can test your code.

D

doAddBook() - Method in class Program4
 
doCheckRowsContinuous() - Method in class Program5
Run checkRowsContinuous() and output the result.
doCheckRowsSimple() - Method in class Program5
Run checkRowsSimple() and output the result.
draw() - Method in class Box
Draws the box on the screen with the colour, height and width specified by the fields, and centered at the correct position.
draw() - Method in class Circle
Draws the circle on the UI
drawGrid() - Method in class Program5
Draws the grid on the screen.

E

erase() - Method in class Box
Erases the box from the UI DO NOT MODIFY THIS METHOD
erase() - Method in class Circle
Erases the circle from the UI

G

getAuthor() - Method in class Book
Gets the author of the book
getRating() - Method in class Book
Gets the rating of the book
getTitle() - Method in class Book
Gets the title of the book
getWidth() - Method in class Box
 
getX() - Method in class Box
 
GRID_LEFT - Variable in class Program5
 
GRID_TOP - Variable in class Program5
 
grow() - Method in class Circle
Makes the circle grow 5 pixels

L

LEFT - Variable in class Program5
 

M

main(String[]) - Static method in class Program1
 
main(String[]) - Static method in class Program2
 
main(String[]) - Static method in class Program3
 
main(String[]) - Static method in class Program4
 
main(String[]) - Static method in class Program5
 
makeNewGrid() - Method in class Program5
Creates a new random grid.
moveLeft(double) - Method in class Box
Makes the box a given number of pixels to the left.

P

printCollection() - Method in class Program4
This method prints out the current contents of the schedule.
printStuff() - Method in class Program1
(a).
processLine(String) - Method in class Program3
This method processes a line from the file and performs the operation it describes.
Program1 - Class in <Unnamed>
Question 1.
Program1() - Constructor for class Program1
 
Program2 - Class in <Unnamed>
Question 2.
Program2() - Constructor for class Program2
 
Program3 - Class in <Unnamed>
Question 3.
Program3() - Constructor for class Program3
 
Program4 - Class in <Unnamed>
Question 4.
Program4() - Constructor for class Program4
 
Program5 - Class in <Unnamed>
Question 5.
Program5() - Constructor for class Program5
 

R

run() - Method in class Program3
Load an image text file and display it
runSimulation() - Method in class Program2
Runs a simulation of a box moving from right to left on a conveyor belt.

S

searchByTitleOrAuthor(String) - Method in class Program4
(a) [15 marks] Complete the searchByTitleOrAuthor(...) method that will search the collection to print the information for all books that have titles or authors that contain the text specified in the parameter.
setupGUI() - Method in class Program1
YOU CAN IGNORE EVERYTHING BELOW THIS LINE *
setupGUI() - Method in class Program2
 
setupGUI() - Method in class Program3
YOU CAN IGNORE EVERYTHING BELOW THIS LINE *
setupGUI() - Method in class Program4
 
setupGUI() - Method in class Program5
 
shrink(double) - Method in class Circle
Makes the circle shrink by the provided amount.
SIZE - Variable in class Program5
 

T

TOP - Variable in class Program5
 
toString() - Method in class Book
Returns this book as a String

U

useCircle() - Method in class Program1
(b) Complete this method so that it: - makes a blue circle at (250,100) with a size of 35 - makes a green circle at (75, 300) with a size of 20 - draws both circles on the screen - makes the first circle grow 2 times - makes the second circle grow 3 times - shrinks the first circle 20 pixels - shrinks the second circle 12 pixels
A B C D E G L M P R S T U 
All Classes All Packages