CPT121 Assignment 1 Part c -booking system for ‘Moolort Heritage Railway Solved

35.00 $ 17.50 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment

Description

Rate this product

This assessment requires you to apply various concepts and techniques covered in weeks 1-4 of the course, in order 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.

Course learning outcomes

This assessment is relevant to the following course learning outcomes:

  • CLO 1: Solve simple algorithmic computing problems using basic control structures and Object-Oriented Techniques
  • CLO 2: Design and implement computer programs based on analysing and modelling requirements
  • 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
  • CLO 4: Identify and apply good programming style based on established standards, practices and coding guidelines
  • CLO 5: Devise and apply strategies to test the developed software

Assessment details

Your task is to produce, using standard Java (Java SE), a prototype computerised booking system for ‘Moolort Heritage Railway’. This (fictional) volunteer railway runs a monthly tourist steam-train service between the north-central Victorian stations of Castlemaine and Moolort.

Interviews with two Moolort Heritage Railway volunteers are given below: Robert, a Ticket Officer and Clem, the Railway Manager. You should analyse the interviews to determine the functional requirements for your program. Your supervisor has provided further requirements. These 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.

The functionality of each stage will be tested on test-case described in TestCases.pdf, which can be found on the course Canvas under the Assignment 1 link.

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. The final result of this process at stage C will become your final submission for assessment 1.

How to use the Double Diamond will be explained in the course webinar, please ask your instructor if you have any questions.

 

 

The assessment is marked out of a total of 10 marks as given in the rubric criteria table at the end of this document.

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 1 link.

Stage A Basic Journey Booking System for CastlemaineMoolort return trips

Your task here is to discover and define the problem and then develop a console-driven Java program which implements the functional requirements derived from the interviews and instructions given below.

Clem — Railway Manager

“Our volunteers run a once monthly tourist service running from Castlemaine to Moolort which then, after a 2-hour stopover, returns to Castlemaine. Our train has three carriages: a ‘First’ class, a second

or ‘Standard’ class, and a third class called ‘Excursion’ class, with seating for 48, 70 and 95 passengers, respectively.

Initially we’d like a prototype for producing a Booking Receipt, as this currently has to be filled out by hand by our ticketing officers, which is time-consuming and error-prone. We’d also like to be able to track and display the number of seats available as sometimes we accidently over-book.”

Robert — Ticket Officer

“We start selling tickets for the next service as soon as the current service has returned to Castlemaine. We can have bookings for multiple seats, as long as they are all for the same class. First class is adults only, as we have a bar service there, and those passengers also appreciate some quiet. Standard and Excursion class, however, can have children too.

So, the ticket prices for First class are $80 per seat. For Standard class, its $55 for an adult and $30 for each child and for Excursion class, an adult ticket costs $40 and $20 for each child. Oh, I should mention that children under three travel for free. That can cause a problem if we forget to ask the customer how old the child is, and issue the wrong ticket. Or even worse, the passenger might not tell us they’ve got a young child, since they travel for free — but we’ve still got to allocate a seat for them!

Sometimes customers ask us how many seats are available for each class before they make a booking. Our Promotions Officer, Abe, sometimes wants to know availability information too. We have to be careful when accepting any booking to ensure we have enough seats available, so it’d be nice if that check could be automated.

Once the booking has been made, we write out a booking receipt listing what class the booking is for, the number of each type of seat, the cost of the seat type and the total price for the booked seats of that seat type. Then we include the booking total.

We basically keep repeating some or all of these tasks until it is quitting time!”

Your supervisor advises that your program should prompt the user to enter the required information in a user-friendly manner, read those values in from the console and store the corresponding values in variables of appropriate types. Displayed output should be neatly tabulated. For example, the booking seat quantities, seat-type prices and booked seat-type total prices of a booking should be aligned into respective columns,with the booking total aligning with the seat-type total prices.

You program for this stage should be implemented as a single class. You will have the opportunity to implement an Object-Oriented design in stage C.

Stage B Booking System for a service stopping all stations

Your task here is to extend your console-driven Java program to implement the functional requirements derived from the interviews and instructions given below.

Clem — Railway Manager

“Our service has been generally under-utilised and so we’ve decided to change it from one that was express between Castlemaine and Moolort to one that stops all stations. Our stations are, in order: Castlemaine, Campbell, Guildford, Strangway, Newstead and Moolort. We’d like your booking system to be able to handle passengers boarding/alighting at any station. The service will still be a return one, and on the return trip, we would only pick passengers up from the station they alighted

at earlier and return them to their initial starting point, so the receipt should indicate the passenger’s initial boarding point, and their outward bound destination point. Our pricing structure has changed to reflect that passenger journeys can be shorter under this new system and we hope this will attract new patronage to offset the possible reduced revenue of shorter trips.

We’ve also decided to implement a group discount of ten percent off bookings with ten or more paying passengers and would like your system to automatically handle that and report the cost saving on the booking receipt.”

Robert — Ticket Officer

“There’s now a booking fee of $5 per paying passenger. But as there are five stops on our line, management decided the cost per station would be of the previous seat cost. So, for example, a single return First class adult seat from Guildford to Strangway is now $16 plus a $5 booking fee. If they went from Guildford to Newstead return, that would be a total of $37. Quite a bargain, if you ask me. We don’t want to have to type out the relevant station names each time we sell a ticket. Just entering a numeric code, such as 0 for Castlemaine and 5 for Moolort would be good enough, as long as we were given the numbers in the prompt.”

Your supervisor advises that your program must utilise arrays of primitive data type for storing how many seats are available for travelling to each stop. An array of String should also be used for storing railway station names.

You program for this stage should be implemented as a single class. You will have the opportunity to implement an Object-Oriented design in stage C.

 

0 RMIT

UNIVERSITY

Stage C — Object-Oriented implementation of the Booking System for a service stopping all stations

Your supervisor advises that you should remodel your stage B Java program to use three classes in order to provide the functionality specified in stage B.

  • Class TrainService stores and manipulates information relevant to the train journey such as what stations comprise the journey and how many of each seat type are available throughout the journey. Arrays should still be used by the class to store this information.
  • Class BookingReceipt implements methods relevant to calculating and printing out a booking receipt, formatted as specified in stages A & B.
  • Class BookingSystem implements the main It collects user information and uses the TrainService and BookingReceipt classes to implement the functionality of stage B.

For the purposes of this stage, Object-Oriented technique involves satisfying all the following criteria:

  • Appropriate choice of classes and methods as per good Object-Oriented programming practice
  • Appropriate private instance variables and/or constants defined for all required values
  • Variables required only within a method are defined locally
  • Visibility of instance variables set to private as per good Object-Oriented programming practice
  • assignment_01_part_c-kexcsi.zip