Use case diagram incremental development, Programming Languages

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

Posted Date: 3/1/2013 8:14:31 AM | Location : United States







Related Discussions:- Use case diagram incremental development, Assignment Help, Ask Question on Use case diagram incremental development, Get Answer, Expert's Help, Use case diagram incremental development Discussions

Write discussion on Use case diagram incremental development
Your posts are moderated
Related Questions
Area Under Curve Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve be

Develop a socket program in UNIX/Linux that uses (i) TCP as the transport protocol and  (ii) UDP as the transport protocol for transferring  a short message between a client and  s

Introduction A search engine (like Google) has three main components: a crawler that finds and stores copies of files on the web, an indexer that creates a data structure that

This assignment is an individual programming assignment using Perl. It addresses objectives 3, 4, 5 and 8 as listed in the Subject Outline document. The assignment is based on them

(a) Define a procedure (subsets x) that takes a list as a single argument and returns all 2^n subsets of that list, i.e. the power set of the list; e.g. (subsets '(a b c)) ==> (

the details on the two pictures on the link below : http://rak-up.com/up/files/18637.jpg ">http://rak-up.com/up/files/18636.jpg http://rak-up.com/up/files/18637.jpg


Draw the sequence diagram for the following scenario of eBroker. Sell Stock The user enters the username and password The system checks that the user is a valid user

1. Write a program that reads a minimum of three command line arguments and displays the program's results. a. Command Line arguments:  i. The first argument will be the program

Expertsmind brings you unique solution in java assignments String Handling Series signifies a sequence of character types. It has set duration of personality sequence. Onc