If you did not finish all the exercises from last week’s lab, try to finish them off this week. If you have already completed those exercises, try these ones. Exercise 1. Write a method that accepts two arguments, an integer and an array of integers. Assume that the numbers in the array are sorted in ascending […]
Tags:
This week, you will download the BlueJ project Week4.zip and write methods to manipulate arrays. Two methods are given to you complete. You don’t have to do anything to them. The method readArray public int[] readArray() reads a list of numbers, one per line, ending with a blank line, and returns an array containing the […]
Tags:
The exercises below use the Tut3.zip project for BlueJ. Data types What data type would you use to represent the following values? Why? The length of a piece of string. The number of students at UNSW. A person’s age. The mass of the sun. The exact number of stars in the Milky Way. The mathematical constant π. […]
Tags:
You will be working in Quad lab 7. Experiment with the BlueJ project we saw in lectures. Login with your zPass login and password. Download the ‘Turtle’ project zip file from here . Unzip both files in your “My Documents” folder. In the ‘Start’ menu, select ‘Programs’ and click on BlueJ. Select ‘Open Project’ from the […]
Tags:
Instead of running tutorials this week, we will be holding consultations during the normal tutorial timeslots with the respective tutor. You are not required to attend a consultation, and no lab marks will be recorded.You may attend any consultation. All consulatations will be held in the room K17 403.
Tags:
This a catch up week. Continue with the exercises from last week to complete your understanding of GUI programming.
Tags:
Graphical User Interfaces Download the zip file containing all the examples from chapter 11 of the text book. When you unzip the file, you will find several folder containing successively more complex examples of GUI building. Start with the simplest imageviewer0-1 and work your way through the code line by line making sure that you understand […]
Tags:
The following exercises are taken from chapter 10 of the textbook. Exercises 1 – 7 explore the simulation so that you become familiar with how it works and with the Java code. The most important exercises to complete for this week are exercises 8 and 9, so don’t spend too long on the earlier ones […]
Tags:
The following exercises are taken from chapter 8 of the textbook. Exercise 8.4 Open the project dome-v2. This project contains a version of the DoME application rewritten to use inheritance, as described above. Note that the class diagram displays the inheritance relationship. Open the source code of the DVD class and remove the ‘extends Item‘ […]
Tags:
JUnit Testing For the exercises this week, download the diary-testing-junit-v2 project. These examples and exercises are based on chapter 6 of the textbook. Using the diary-testing-junit-v2 project, create a method in DayTest to check that findSpace returns the value of 10 for a one-hour appointment if a day already has a single one-hour appointment at […]
Tags: