Introduction to the Java programming language, beginning with the concepts of classes and objects and instruction in the use of a key tool used throughout the course, namely the BlueJ Integrated Development Environment (IDE).
Here you will be introduced to Java source code and acquire practice in the use of methods and parameter passing. The state of an object will be explored. You will write code to solve simple problems related to geometric shapes such as a circle and right circular cone, for example calculating the area and perimeter of the circle and the volume of the cone.
This lab contains sample solutions to the exercise set.
In this lab we shall build a very basic virtual ticket machine and in doing so gain further experience with some of the elements of classes such as fields, constructors and methods. We shall conduct a rudimentary analysis of the ticket machine class and implement some design improvements.
Solutions to the exercise set are provided here.
Use a set of objects from the shapes project to manually create a house object. Use existing Square, Circle and Triangle classes. Manually assemble component set to create and display initial design. Develop a new class Rectangle by refactoring Square class. Further refactor Circle and Triangle classes.
Develop a new class Tree using Rectangle and Triangle classes. Develop a new class Picture containing House, Circle (sun) and Tree fields.
Based on BlueJ ClockDisplay progressively develop NumberDisplay class to display a pair of digits to represent hours and minutes using the existing BlueJ class Clock to drive the ClockDisplay.
These are the solutions to the exercises set in the lab relating to shapes.
These are the solutions to the exercises relating to the BlueJ ClockDisplay and NumberDisplay classes.
Use BlueJ Notebook class to gain basic experience with the ArrayList collection class. Explore some of its methods by generating and manipulating test data. Gain experience in looping using for, enhanced for, while, do-while and iterators.
These are the solutions to the exercises set in the session Grouping Objects and relating to
Assignment 1: This assignment is based on materials contained in the slide decks and labs in the first 4 topics, namely, Introduction to Java programming language, Object Interaction and Grouping Objects. In this assignment, we will combine all these topics into a multi-class gym app.
In this lab, you will explore the Eclipse IDE and use the main method as the starting point for your applications. You will also move the BlueJ Shop project into Eclipse format.
In this lab, you will implement CRUD into ShopV3.0. You will also apply your CRUD knowledge to another domain i.e. start to build a DVD library.
On completion of this lab you should be able to:
In this lab, you will implement exception handling in ShopV5.0.
In this lab, you will become more familiar with primitive arrays, particularly using counter-controlled loops with them.
On completion of this lab you should be able to:
The objectives of this lab are to implement both inheritance and polymorphism in the Network system.
The objectives of this lab are to use a package structure for the Shop app and also to write re-usable utilies. We will also experiment with Wrapper classes and parsing.
The objectives of this lab are to implement an inheritance hierarchy into our Shop project.
The objectives of this lab are to:
On completion of this lab you should be able to:
On completion of this lab you should be able to: