Use case diagram incremental development, Programming Languages

Assignment Help:

Introduction

This assignment builds on your application, produced in Assignment 1, which holds a list of cabins, which can be either read in from a text file or just hard coded in a ‘populate' method. The statistical reports in Assignment 1 are not needed in this assignment. Contact the lecturer if you do not have a suitable ‘list of cabins' program.

Unlike assignment one, you should work on this assignment yourself, but you are of course welcome to discuss it with other students.

The Application

You should develop your program using incremental development. Develop your program a little bit at a time and keep testing it. Save a working version before making the next set of alterations. Then, if you run out of time, you can submit a program which provides some of the functionality. You will get very few marks for handing in lots of code that does not run correctly.

All code should be well-designed, well-laid out and commented.

Conditions for this coursework

All students MUST complete coursework to a satisfactory standard, you are not allowed to pass the course just on the examination alone, even if you score 100% in the exam which will give you 60% for a course mark. If you don't do the coursework this semester, you will be asked to do it later, although it wouldn't then count towards your final mark.

If you hand in work late, without extenuating circumstances, 10% of the maximum available mark will be deducted from the mark awarded for each day late.

Part One - UML Use case Diagram, Text description and Activity Diagram

You can draw these diagrams using any tool that you like - a UML tool, a drawing package, or by hand.
The scenario below is JUST for the use case and activity diagrams - the application that you are asked to write is a little simpler.
Draw a Use Case Diagram for the following scenario, and write a detailed description of the ‘book-in' use case - this is the numbered ideal scenario with alternatives (see slide 10 of Use case lecture). There are probably several equally correct interpretations of this scenario, so don't worry if you don't all have identical diagrams.

A campsite has a number of cabins which can be hired on a daily basis, and a number of grass plots for tents, caravans or motor homes. Cabins and plots will be referred to as ‘locations'. Travellers aged under 18 are not allowed to stay on this campsite.
Travellers cannot book in advance at this campsite, they just turn up and, as long as there is a free location, they are allocated a cabin or plot. When they arrive, they fill in a ‘visitor form' giving their personal details, and show their passport (which includes their date of birth). While they are doing this, the campsite staff fill in another form on the computer just entering the location id and the form number, and how many nights they are staying for. The traveller must pay the cost of the location for one night when booking in. Then the traveller is shown where their location is.

If the traveller wishes to stay an extra night, he must pay for that in advance. This can be done either when booking in, or at a later stage.
The campsite has a manager and several assistants. All campsite staff can book in travellers, and handle payment. In addition, the manager can view various reports on occupancy and income.

Draw two activity diagrams: one for the book-in use case, and one for some coding involving decisions in your application, for example the getCost() method.

Part Two - using Inheritance

Write your initial Plot class anytime, continue after the 3 inheritance lectures.

Keep a copy of Assignment One before continuing!
You are NOT being asked to develop a complete booking system here. You are not expected to cope with payment at all, or restrict access according to the type of user.

First write a Plot class and test using a main method, not using inheritance at all:
Decide on a small amount of information to keep for each plot. E.g. plot number, whether it has electricity or not, something else. Decide on a very simple calculation to work out the cost of each plot depending upon its attributes. Write a getCost() method. As in assignment one, your decisions should be different to those of your friends.

This application will only record whether a location is booked for the current night or not, and keep a count of how many times each location has been used. Now create a Location superclass and adapt your Cabin and Plot classes to become subclasses of Location. Test using a main method:
Use a superclass Location with subclasses Cabin and Plot.

The Location class includes any common attributes or methods shared by Plot and Cabin. One of these methods must be an abstract getCost() method.

In the Location class, also add in a boolean instance variable to show whether the location is booked or not for this night, and a count of the number of bookings for this location. Imagine that each day the computer is switched on and this booking boolean starts at ‘false'. Then when the traveller arrives, the booking is entered into the computer - this simply sets the booking boolean to ‘true' and increases the count of bookings for this location.

You need to alter your Cabin and Plot class so that they extend Location, and move any common attributes or methods to the Location class. Here is one way in which you could handle the ID: refer to the cabins using the prefix ‘C', and plots with the prefix ‘P'. So that, whereas before, cabins were numbered 1,2,3 etc, now locations are numbered C1, C2, C3, ......P1, P2, P3.....etc.

The Location class should return a String consisting of the location information (id, booked or not, count of bookings).
The Cabin and Plot class should have methods which return full details of the cabin or plot, and including the location information.

Extend your ‘list of cabins' application to become a ‘list of locations'. Read in cabin and plot data from 2 separate text files. For this application, you can assume that your text files contain correct data - you don't need to do any checking. You don't need methods such as min/max/total. You will need methods to:
• Search for a location given the id. This returns a Location object that you can use in other methods
• Return a String containing summary information for each location


Related Discussions:- Use case diagram incremental development

Programs for shell scripts, 1. Write a bash shell script which searches thr...

1. Write a bash shell script which searches through your folders for files with the extension *.tex, and then interactively deletes the corresponding *.aux, *.dvi and *.log files (

Write a program that draws the initials j, Write a program that draws the i...

Write a program that draws the initials J G P on the form similar to that shown in Fig J 1 (using straight lines and curve semicircles). The figure can not have corners. All ends a

Service oriented architectures in xml, question 1: In the opening lecture I...

question 1: In the opening lecture I spoke about general changes in business - flatter organizations, process orientation as opposed to functional silos, focus on supply chains, gr

Project on automatic payments to employees, A large logistics company requi...

A large logistics company requires a software system to support the business processes associated with managing shift patterns of employees and making the associated payments. The

Develop a windows forms application, Develop a Windows Forms Application by...

Develop a Windows Forms Application by creating a new project named "xxxxxxxx" in a new folder named "xxxxxxxxas3" where xxxxxxxx is your student id. You should delete file(s) with

Included applications, Hi, Can any of you, tell me how to use Included Ap...

Hi, Can any of you, tell me how to use Included Applications?

Sql vb integration, I need an application that will gather data from one SQ...

I need an application that will gather data from one SQL Database and update another. Data is contained in dbo.CallList with following fields: Customer_ID, AlreadyPickedUp, Phone_N

Frotran 2000, Please explain about sub programming.

Please explain about sub programming.

Corba multiple clients, I have an assignment that requires from me to run ...

I have an assignment that requires from me to run multiple clients and one server ( Corba)

Shell script to find a particular pattern from the file, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd