CS计算机代考程序代写 database Java 1

1

business.unsw.edu.au

UNSW Business School

School of Information Systems and
Technology Management

INFS1609 Assignment 2 (15%)

Revision Date Changes

1 15/10/2021 Initial release

Assignment Design

• This assignment is to be undertaken as an individual assignment

• This assignment is graded upon 15 marks and counts for 15% of your Overall
Marks for this course

o This assignment contains 2 parts:
Student Gradebook and Bike Repair Shop

• The assignment is due on Friday 19th November 2021, by 1200hrs (noon)
o If you would like to make a submission after this date you will need to

email your submission directly to the Lecturer

• The assignment must be submitted electronically via Ed > Assessments
o Submission requirements are outlined in each respective part

• Test cases are used to do a first-round marking of your code. You should try
to run your program on Ed to check if they pass the test cases. Test run your
code as early as possible because you might need to make changes to your
code.

• Please use the Ed discussion forum to discuss any issues related to this
assignment.

• The readability of your code is one of the marking criteria. You should take
care of your coding style.

Please make sure you have read the information about UNSW Business School
protocols, University policies, student responsibilities and education quality and support on
your Course Outline:
https://www.business.unsw.edu.au/degrees-courses/course-outlines/INFS1609#policies

If you have any questions about interpreting the assignment and its requirements, please make
use of the Lecturer’s consultation sessions. To avoid confusion and misunderstanding, we will
not be answering assignment-related questions over email.

https://www.business.unsw.edu.au/degrees-courses/course-outlines/INFS1609#policies

2

business.unsw.edu.au

Part 1 – Student Gradebook (5%)

Implement a simple student gradebook which prompts the user to enter the student’s
name, faculty, start year and grades. Your program should print the student’s WAM
(average of grades entered), and summary data of grades (defined by
https://student.unsw.edu.au/grade).

You must design a Student class which contains the appropriate attributes to store

all of the information. You must create the appropriate getter, setter, and constructor

methods.

We will provide you with a TestStudent class, this class is responsible for prompting

the user for input and displaying the output as required below. Text written in purple

underline in the samples below indicate user input. Round to 2 decimal places when

required – if there are no decimals do not show a decimal point.

You can assume that all values entered are valid.

Enter student’s name: Jess
Enter student’s faculty: Business
Enter student’s year: 2021
Enter student’s grades: 75,75,76,74

Jess – Business – 2021
WAM: 75
0 x F
0 x P
1 x C
3 x D
0 x HD

Marking Criteria:

Presentation &

correctness

( 2 marks )

1 mark Style and cleanliness, indentation, camelCase

1 mark Programming correctness, variable naming, placement

of methods

Test cases

( 3 marks )

1 mark per test case – 3 test cases total

Plagiarism 90% penalty for the entire assignment for substantial plagiarism
More information on the appeal process and what is considered to be plagiarism is available on

the course outline

https://student.unsw.edu.au/grade

3

business.unsw.edu.au

Part 2 – Bike Repair Shop (10%)

You’ve been asked by a bike repair shop to implement a basic database system. The

relationship between objects is dictated below:

Each class has the following attributes:

• Bike (String owner, String model, int wheelDiameter, int gears,

int kmsRidden)

• MountainBike (int suspensionDepth)

• RoadBike (int reflectorsFitted)

Your Bike Shop is a bit quirky; the service interval is calculated in the following way:

• MountainBike = wheel diameter * gears – suspension depth

• RoadBike = kms ridden * reflectors fitted

• Bike = length of owner’s name * gears

4

business.unsw.edu.au

Programming tasks (8%):

• Using your knowledge of OOP, Inheritance and Polymorphism design and

implement the classes above

• You should submit 5 Java files: BikeSystem.java, TestBikeSystem.java,

Bike.java, MountainBike.java and RoadBike.java

• You will need to implement a BikeSystem class which is in charge of

maintaining the objects, the BikeSystem constructor should take an int which

specifies the number of bikes the BikeSystem can hold, and should provide

the following publicly accessible methods:

public boolean insertBike(String bikeString)

The boolean will indicated whether the Bike was successfully created. Returns

false if the bike already exists or the BikeSystem is full. You will need to

parse these Strings and create objects from them

The bikeStrings will come in the following formats:

Bike|||||

MTB||||||

RB||||||

public boolean bikeExists(String owner, String model)

This boolean will indicate whether the bike exists in the system or not

public void printSystem()

This should call the toString() method of each object and print it to the screen

in the same format as the bikeString inputs

public void closeShop()

This should empty the bikeShop and restore it to an empty state

public void printServiceIntervals()

This should print the list of bikes, and service intervals in the format:

owner, model, serviceInterval

Design Explanation (2%):

• You must submit a design.txt file containing your answer to the following

questions (200 words maximum)

• Explain what is happening when you call toString() for each of the objects

when calling printBikeSystem()?

• When you determine the service interval in printServiceIntervals() what

aspect of OOP are you utilising at runtime?

5

business.unsw.edu.au

Marking Criteria:

Presentation &

correctness

( 2 marks )

1 mark Style and cleanliness, indentation, camelCase

1 mark Programming correctness, variable naming, placement

of functions

Functionality

Tests

( 6 marks )

1 mark insertBike functions correctly

1 mark bikeExists functions correctly

1 mark printSystem functions correctly

1 mark closeShop functions correctly

1 mark printServiceInterval functions correctly

1 mark mystery test case
There may be more than one test case required to determine each mark

Design

Explanation

( 2 marks )

1 mark correctly identify the relationship between objects and

toString()

1 mark correctly identify the aspect of OOP that occurs at

runtime

Plagiarism 90% penalty for the entire assignment for substantial plagiarism
More information on the appeal process and what is considered to be plagiarism is available on

the course outline