Codingassignmenthelper | Home Codingassignmenthelper | University

SENG1110 / 6110 Programming Assignment 1

Semester 1

Assignment : ALCOLWORTHS Supermarkets - Help to Start

This document aims to provide some initial steps to help you start assignment 1. Note that you do not have to follow these steps exactly. There are many other ways to complete the assignment.

It is suggested that, each time you implement a new method, you test it before proceeding. Bug-finding can be much harder if your code is built on untested methods.

Step 1

Write an initial version of Product.java. There is a template available on Blackboard that may help. Declare instance variables using the assignment specification. Compile, and fix any errors. Implement some get and set methods. Again, compile, and fix any errors.

Step 2

Write an initial version of Interface.java. There is a template available on Blackboard that may help.
Test your Product class using Interface. Here is some example code:
Scanner console = new Scanner(System.in);
System.out.println("Enter name: ");
String name = console.nextLine();
Product p = new Product();
p.setName(name);
System.out.println("Name: " + p.getName());
Compile and run. Implement more methods of Product, and test them.
After testing, remember to delete the above lines. They were used only for testing.

Step 3

Write an initial version of Depot.java. There is a template available on Blackboard that may help.
Test your Depot class using Interface.java. Here is some example code.
Scanner console = new Scanner(System.in);
System.out.println("Enter name: ");
String name = console.nextLine();
Depot d = new Depot();
p.setName(name);
System.out.println("Name: " + d.getName());
Compile and run. Implement more methods of Depot, including ones that add and remove Product objects, and test them.

Step 4

Add code to Interface.java that presents a menu of options to the user, and queries for a positive integer.
Make the program exit for a certain selected option. Compile and test before proceeding.

Step 5

Add code to your program, implementing each functionality in the assignment specification. Compile, run, and test your program as you go.

As stated above, these steps just provide a starting point. Depending on what questions are received from students, we will add information to Blackboard and send an email to let you all know. Remember to use the discussion board to post your questions, but DO NOT post your code.

To Download Click Here > SENG1110/6110 Programming Assignment 1 - Semester 1.pdf
Codingassignmenthelper | Home Codingassignmenthelper | Home