Programming Fundamentals

John Fitzgerald (labs), Dr. Siobhan Drohan (lectures). Creative Commons License
Classes-objects

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).

Class-components

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.

Class-components-Solutions

This lab contains sample solutions to the exercise set.

Ticket-Machine

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.

Ticket-Machine-Solutions

Solutions to the exercise set are provided here.

Abstraction-modularization[1]

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.

Abstraction-modularization[2]

Develop a new class Tree using Rectangle and Triangle classes. Develop a new class Picture containing House, Circle (sun) and Tree fields.

Abstraction-modularization[3]

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.

Abstraction-modularization-Solutions-[1-2]

These are the solutions to the exercises set in the lab relating to shapes.

Abstraction-modularization-Solutions-[3]

These are the solutions to the exercises relating to the BlueJ ClockDisplay and NumberDisplay classes.

Generics-Control-flow

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.

Notebook_solutions-[1-3]

These are the solutions to the exercises set in the session Grouping Objects and relating to

Assignment1

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.

Eclipse

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.

CRUD

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.

XML

On completion of this lab you should be able to:

Exception

In this lab, you will implement exception handling in ShopV5.0.

Primitive-Arrays

In this lab, you will become more familiar with primitive arrays, particularly using counter-controlled loops with them.

TechSupport

On completion of this lab you should be able to:

NetworkSystem

The objectives of this lab are to implement both inheritance and polymorphism in the Network system.

ShopV6.0

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.

ShopV7.0

The objectives of this lab are to implement an inheritance hierarchy into our Shop project.

Lab-Abstraction

The objectives of this lab are to:

Lab-DVDTesting

On completion of this lab you should be able to:

Lab-10

On completion of this lab you should be able to: