11
Page 1 of 11 School of Science CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due date: Sunday ending Week 8 (i.e. 26th July 2020) 11:59PM (AEST) As this is a major assignment in which you demonstrate your understanding, a university standard late penalty of 10% per each working day applies for up to 5 working days late, unless special consideration has been granted. Weighting: 15% Overview This assessment requires you to apply various concepts and techniques covered in weeks 1–8 of the course, to assemble a programmatic solution for a problem based on a simulated real-world scenario. An important part of your development as a programmer is the ability to identify and apply appropriate techniques or programming structures when implementing the various aspects of a programmatic solution to a given problem, so in addition to the basic functional requirements of this task, you will also be assessed on your ability to select and utilise appropriate techniques and structures in your solution. This assessment requires you to design and create a Java program to solve analysed stakeholder (user and supervisor) requirements.

CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 1 of 11

School of Science

CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2

Assessment type: Individual assignment; no group work. Word limit: N/A

Due date: Sunday ending Week 8 (i.e. 26th July 2020) 11:59PM (AEST)

As this is a major assignment in which you demonstrate your understanding, a university standard late penalty of 10% per each working day applies for up to 5 working days late, unless special consideration has been granted.

Weighting: 15%

Overview

This assessment requires you to apply various concepts and techniques covered in weeks 1–8 of the course, to assemble a programmatic solution for a problem based on a simulated real-world scenario.

An important part of your development as a programmer is the ability to identify and apply appropriate techniques or programming structures when implementing the various aspects of a programmatic solution to a given problem, so in addition to the basic functional requirements of this task, you will also be assessed on your ability to select and utilise appropriate techniques and structures in your solution.

This assessment requires you to design and create a Java program to solve analysed stakeholder (user and supervisor) requirements.

Page 2: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 2 of 11

Assessment grading criteria

This assessment will measure your ability to:

x Apply the specified coding and documentation style guide x Apply basic features of Java and Object-Oriented techniques (covered in weeks 1-8 of the course

material) to solve the user and supervisor requirements x Produce correct and well formatted output on provided test data

Course learning outcomes

This assessment is relevant to the following course learning outcomes:

x CLO 1: Solve simple algorithmic computing problems using basic control structures and Object-Oriented Techniques

x CLO 2: Design and implement computer programs based on analysing and modelling requirements x CLO 3: Identify and apply basic features of an Object-Oriented programming language through the use of

standard Java (Java SE) language constructs and APIs x CLO 4: Identify and apply good programming style based on established standards, practices and coding

guidelines x CLO 5: Devise and apply strategies to test the developed software

Page 3: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 3 of 11

Assessment Details

‘Bendigo Tool Library’ (BTL) is a (fictional) small community library that loans out tools, books/manuals and workwear to library patrons. The increasing popularity of the library means their existing manual system for recording details of items, patrons and loans is not coping. They are asking you to develop prototype software for managing these details.

An edited summary of client interviews are given below:

Sarah: BTL Manager

We have loan out to our patrons three types of items: Books (including tool manuals), Workwear and Tools. I'd like the prototype system to allows staff to do the following from a console menu:

x Add a new patron

x Display a specified patron

x Add an item (Book, Workwear or Tool)

x Display a specified item

x Display all items

x Borrow an item

x Return an item

x Exit

Alex: A volunteer BTL librarian

All our items have an ID code, which consists of a letter (B for book, W for workwear and T for tool) followed

by a number. For some reason we started that number at 100, and we incremented it for each item, no

matter what type of item it was. Each item also has a title (e.g. a workwear item might have the title ‘Face

Shield’).

In addition, books have an author and the name of their publisher.

For workwear we record the size, which is an integer.

For a tool we record the name of the manufacturer and the model code. Tools might also have an

associated manual (i.e. book). The manual can be borrowed independently of the tool. If the tool is

available, the manual (if any) must also be available in order to be able to loan the tool (and manual) out.

When the tool (and manual) is returned, we record them both as being available. For this prototype you can

assume that if a patron has borrowed a tool with a manual, then both will be returned at the same time.

Each patron has a patron ID (the letter P followed by an integer, which is 1 for the first patron, and

incremented for each successive patron). Patrons also have a name, and of course, a list of loans. Each loan

is for a single item, and that item becomes unavailable for further borrowing until it is returned. If a tool

which has a manual is borrowed, the tool and manual is regarded and stored as a single loan.

After successfully adding an item or patron, the system should display their associated ID.

When displaying all items, we just want to see the item ID, title and whether or not it has been borrowed.

This information should be presented in neatly formatted and labelled columns.

Page 4: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 4 of 11

For displaying a specific item we want to search based on the item ID, and we want to see all information

about the item, neatly formatted.

When displaying a specific patron we want to be able to search using either the patron ID or their name. We

want to see all information about the patron, neatly formatted. This should include the item ID and title of

any items they have borrowed presented in neatly formatted and labelled columns.

If any operation fails, we want to see an associated error message.

Additional requirements:

For this prototype, only 3 patrons and 5 items need to be stored, and each patron can have up to 4 loans. These quantities however must be adjustable to any number by adjusting integer constants called MAX_PATRONS, MAX_ITEMS and MAX_LOANS respectively without any further alteration to your code.

You should analyse the interviews to determine the functional requirements for your program. Further requirements are set out in the three stages (A, B and C) below. Since each stage elaborates on the previous one, you only need to submit one program – the one implementing the highest stage you were able to complete. Please ask your instructor if you have any questions about the requirements.

Important: Your submission must only use coding concepts covered in weeks 1..8 of the course. Penalties may apply if other concepts are used. For example, you must not use ArrayLists as these are not covered in weeks 1..8.

For each of the stages A, B and C, complete the steps below based on the Double Diamond process:

Discover

‘Go wide’ in the form of reading and thinking about the supplied stakeholder requirements. Find out what the current situation is and understand user behaviours and business drivers.

Fill in the supplied ‘Discover and Define’ Word template with a list of different problems that could be solved.

Define

From your understanding of the overall issues/requirements, narrow down to a single problem and turn that into a problem statement. The problem statement defines what you will develop, and you may start some initial coding to start working out if you can create a solution to the problem you defined.

Fill in the supplied ‘Discover and Define’ Word template with a statement of the single problem you will solve.

Develop

Start coding to create an initial prototype and program logic to address the problem. You may create a few different iterations to get to the best prototype. This is a phase for trying ideas out to see if they work.

Deliver

Pick the best prototype from the ‘Develop’ phase and create the final version of the code, refining and making it work. The aim is to create a minimum viable product (MVP) to address the problem you have identified and defined.

Page 5: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 5 of 11

Coding Style/Documentation

Your program must follow the coding and documentation style guide given in the file StyleGuide.pdf, available on the course Canvas under the Assignment 2 link.

Stage A – Classes Item, Patron and their management

In stage A you need to construct three classes. The Item class stores and can display generic item information (ID and title) and record (and display) if the item has been borrowed. An item can be ‘checked out’ (i.e. borrowed) and ‘checked in’ (returned).

The Patron class should model a patron, as described in the interviews. At this stage is isn’t necessary to process loans, however the class must contain an array of Item, called loans, for this purpose. The Patron class must include a method to display patron information.

The final class, called StageA, manages adding and displaying items and patrons. Borrowing and returning items is not required at this stage.

Important: Class StageA must use the following arrays (only) for storing and manipulating Items and Patrons:

x holdings : an array of type Item x patrons : an array of type Patron

You are expected to adhere to all relevant object-oriented programming guidelines, including: • Visibility of instance variables and methods set appropriately • Instance variable initialisations carried out in the constructor only • No unnecessary accessors (setters) or mutators (getters) - only provide methods which will be needed when implementing the application class in this stage • Object methods encapsulate program logic relevant to the object • Methods should work with instance variables when performing their required task • Parameter lists in methods should be appropriate to the task the method is performing - only accept parameters where a method requires one or more values from the caller to perform its assigned task that it does not already have access to. • Methods which need to communicate a value or result back to the caller should do by returning the value in question, not by storing it in an instance variable or printing it to the screen. • Data classes should not prompt for input from the user.

Your program should be able to handle conditions such as attempting to add too many patrons or items, or requesting to display a non-existent item. Your program must be a console-driven application.

Stage B – Implementing classes Book and Workwear, and allowing items to be borrowed/returned

In this stage, classes Book and Workwear should be implemented as extensions of class Item, in order to implement the functionality described in the interviews.

Page 6: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 6 of 11

Class StageA should be renamed StageB and modified to only store items of type Book and Workwear (generic Items are no longer processed). StageB should also permit items to be borrowed and returned. The arrays holdings, patrons and (inside the Patron class) loans must still be of the types specified in stage A and must be used for the purposes indicated in stage A.

In addition to the requirements from stage A (adapted to handle the new Book and Workwear classes), your program should be able to handle conditions such as borrowing a Book or Workwear item that has already been borrowed, a patron attempting to borrow too many items, or an attempt to return an item that hasn’t been borrowed.

You are expected to adhere to all relevant object-oriented programming guidelines, as described in stage A as well as:

• Inheritance and overriding used as appropriate to extend class functionality • Polymorphism and dynamic binding used as appropriate to process objects of various classes through calls to overridden methods.

Stage C – Implementing and managing the Tool class.

In this stage, class Tool should be implemented as extensions of class Item, in order to implement the functionality described in the interviews. Displaying a tool should also display any details of the associated manual (if any). Class StageB should be renamed StageC and modified to permit the adding, borrowing and returning of Tools, as described in the interviews as well as the requirements from stage B (adapted to include handling the new Tool class). You are expected to adhere to all relevant object-oriented programming guidelines, as described in stage A.

Referencing guidelines

What: This is an individual assignment, and all submitted code must be your own. If you have used examples of code from sources other than the contents directly under the course Canvas Modules link, or the recommended textbook (e.g. an example from the web or other resource) as the basis for your own code then you should acknowledge the source(s) and give references using the IEEE referencing style.

Where: Add a block code comment near the work to be referenced and include the reference in the IEEE style.

How: To generate a valid IEEE style reference, please use the citethisforme tool if unfamiliar with this style.

Submission format

Submit your Java course code file (or Eclipse project) on the course Canvas under the Assignments/Assignment1 link as a file upload.

Marks are awarded for meeting requirements as closely as possible. Clarifications/updates may be made via announcements/relevant discussion forums on the course Canvas.

Page 7: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 7 of 11

Academic integrity and plagiarism

Academic integrity is about honest presentation of your academic work. It means acknowledging the work of others while developing your own insights, knowledge and ideas.

You should take extreme care that you have:

x Acknowledged words, data, diagrams, models, frameworks and/or ideas of others you have quoted (i.e. directly copied), summarised, paraphrased, discussed or mentioned in your assessment through the appropriate referencing methods

x Provided a reference list of the publication details so your reader can locate the source if necessary. This includes material taken from Internet sites

If you do not acknowledge the sources of your material, you may be accused of plagiarism because you have passed off the work and ideas of another person without appropriate referencing, as if they were your own.

RMIT University treats plagiarism as a very serious offence constituting misconduct.

Plagiarism covers a variety of inappropriate behaviours, including:

x Failure to properly document a source

x Copyright material from the internet or databases

x Collusion between students

For further information on our policies and procedures, please refer to the University website.

Assessment declaration

When you submit work electronically, you agree to the assessment declaration.

Page 8: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 8 of 11

Criteria

Ratings

Pts

H

D

D

C

P N

D

NS

Code style/docum

entation

All three Style Guide guidelines w

ere im

plemented, no areas

of improvem

ent were

identified

All three Style Guide guidelines w

ere im

plemented,

minor issues

noted with one

guideline

All three Style Guide guidelines w

ere im

plemented,

minor issues

noted with tw

o guidelines

All three Style Guide guidelines w

ere im

plemented,

significant issues noted w

ith one guideline

Fewer than three

Style Guide guidelines w

ere im

plemented, or

major issues

were noted w

ith m

ore than one guideline

The Style Guide guidelines w

ere not follow

ed

2.0 pts

1.5 pts 1.0 pts

0.5 pts 0.1 pts

0.0 pts 2.0

Stage A classes

Full marks also aw

arded if stage B or C passed

Classes Item, Patron

and StageA as per stage A specifications, all stage A object oriented guidelines adhered to.

Classes Item,

Patron and StageA as per stage A specifications, m

inor issues noted on one class or som

e object oriented guidelines not adhered to.

Classes Item,

Patron and StageA as per stage A specifications, m

inor issues noted on tw

o classes or one significant issue noted on one class.

Classes Item,

Patron and StageA as per stage A specifications, m

inor issues noted on all classes or significant issue noted on tw

o classes.

Attempt m

ade to im

plement

classes Item,

Patron and StageA, significant issues w

ith all classes

Not

implem

ented or arrays holdings and/or patrons not used as specified.

1.0 pts

0.8 pts 0.6 pts

0.4 pts 0.2 pts

0.0 pts 1.0

Stage A Functionality

Full marks also aw

arded if stage B or C passed

Correctly added items,

correctly added patrons, correctly displayed all item

s, correctly displayed specified item

, correctly displayed specified patron. All displays neatly form

atted as specified. Errors handled as specified.

Correctly added item

s, correctly added patrons, correctly displayed all item

s, correctly displayed specified item

, correctly displayed specified patron.

Error in one of: added item

s, added patrons, displayed all item

s, displayed specified item

, displayed specified patron.

Error in more

than one of: added item

s, added patrons, displayed all item

s, displayed specified item

, displayed specified patron.

Attempted to use

arrays holdings and/or patrons as specified, but code not functional.

Functionality not im

plemented, or

arrays holdings and/or patrons not used as specified.

Page 9: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 9 of 11

Displays generally not neatly form

atted as specified, or errors not handled as specified.

1.5 pts

1.2 pts 0.9 pts

0.6 pts 0.3 pts

0.0 pts 1.5

Stage B C

lasses Full m

arks also awarded if stage C

passed

Classes Book, W

orkwear and StageB

as per stage B specifications, all stage B object oriented guidelines adhered to. Patron class im

plemented loans

array as per stage B specifications.

Classes Book, W

orkwear and

StageB and Patron as per stage B specifications, m

inor issues noted on one class or som

e stage B object oriented guidelines not adhered to.

Classes Book, W

orkwear, Patron

and StageB as per stage B specifications, m

inor issues noted on tw

o classes or one significant issue noted on one class

Classes Book, W

orkwear, Patron

and StageB as per stage B specifications, m

inor issues noted on three classes or significant issue noted on tw

o classes

Attempt m

ade to im

plement

classes Book, W

orkwear, Patron

and StageB as per stage B specifications, significant issues w

ith all classes

Book or W

orkwear

classes not im

plemented, or

arrays holdings and/or patrons and/ or loans not used (in class Patron) as specified.

1.5 pts

1.2 pts 0.9 pts

0.6 pts 0.3 pts

0.0 pts 1.5

Stage B Functionality

Full marks also aw

arded if stage C passed

Correctly added book and w

orkwear item

s, correctly added patrons, correctly displayed all book and w

orkwear item

s, correctly displayed specified book/w

orkwear item

, correctly displayed specified patron. Correctly im

plemented

book/workw

ear borrow

ing and returns. All displays neatly form

atted as

Correctly added item

s, correctly added patrons, correctly displayed all item

s, correctly displayed specified item

, correctly displayed specified patron. Correctly im

plemented

book/workw

ear borrow

ing and returns. D

isplays

Error in one of: added book/w

orkwear

items, added

patrons, displayed all book/w

orkwear

items,

displayed specified book/w

orkwear

item, displayed

specified patron, book/w

orkwear

borrowing,

book/workw

ear item

return.

Error in two of:

added book/w

orkwear

items, added

patrons, displayed all book/w

orkwear

items,

displayed specified book/w

orkwear

item, displayed

specified patron, book/w

orkwear

borrowing,

book/workw

ear item

return.

Error in more

than two of:

added book/w

orkwear

items, added

patrons, displayed all book/w

orkwear

items,

displayed specified book/w

orkwear

item, displayed

specified patron, book/w

orkwear

borrowing,

Stage B functionality not im

plemented, or

was not

functional or did not use arrays holdings and/or patrons and/or loans (in class Patron) as specified.

Page 10: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 10 of 11

specified. Errors handled as specified.

generally not neatly form

atted as specified, or errors not handled as specified.

book/workw

ear item

return.

2.0 pts

1.7 pts 1.3 pts

0.7 pts 0.3 pts

0.0 pts 2.0

Stage C C

lasses

Implem

ents all stage B classes requirem

ents and: classes Tool and StageC as per stage C specifications.

Classes Tool, Book, W

orkwear and

StageC and Patron as per stage C specifications, m

inor issues noted on one class or som

e stage B object oriented guidelines not adhered to.

Classes Tool, Book, W

orkwear, Patron

and StageC as per stage C specifications, m

inor issues noted on tw

o classes or one significant issue noted on one class

Classes Tool, Book, W

orkwear, Patron

and StageC as per stage C specifications, m

inor issues noted on three classes or significant issue noted on tw

o classes

Attempt m

ade to im

plement

classes Tool, Book, W

orkwear,

Patron and StageB as per stage C specifications, significant issues w

ith all classes

Tool or Book or W

orkwear

classes not im

plemented, or

arrays holdings and/or patrons and/ or loans not used (in class Patron) as specified.

1.0 pts

0.8 pts 0.6 pts

0.4 pts 0.2 pts

0.0 pts 1.0

Stage C Functionality

All stage B functionality correctly im

plemented and:

Correctly added tool item

s, correctly displayed all tool item

s, correctly displayed specified tool item

, Correctly im

plemented tool

borrowing and

returns. All displays neatly form

atted as specified. Errors handled as specified.

All stage B functionality correctly im

plemented and:

Correctly added tool item

s, correctly displayed all tool item

s, correctly displayed specified tool item

, Correctly im

plemented tool

borrowing and

returns. Displays

generally not neatly form

atted as specified, or

Error in one of stage B functionality or : added tool item

s, displayed all tool item

s, displayed specified tool item

, tool borrow

ing, tool item

return.

Error in two of

stage B functionality or : added tool item

s, displayed all tool item

s, displayed specified tool item

, tool borrow

ing, tool item

return.

Error in more

than two of stage

B functionality or : added tool item

s, displayed all tool item

s, displayed specified tool item

, tool borrow

ing, tool item

return.

Stage C functionality not im

plemented, or

did not use arrays holdings and/or patrons and/or loans (in class Patron) as specified.

Page 11: CPT121 / COSC2135 Programming 1 (OUA) · CPT121 / COSC2135 Programming 1 (OUA) Assessment 2: Assignment 2 Assessment type: Individual assignment; no group work. Word limit: N/A Due

Page 11 of 11

errors not handled as specified.

1.0 pts

0.8 pts 0.6 pts

0.4 pts 0.2 pts

0.0 pts 1.0

Total: 10 pts