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

Write the html code to bind this xml data, Question: (a) (i) Describe w...

Question: (a) (i) Describe what an XML Data Island is and outline the restrictions of using a Data Island. (ii) The following XML file book.xml is used to keep track of a l

Applications of oop, Applications of OOP, The promising areas for applicati...

Applications of OOP, The promising areas for application of OOP include: Real-time systems Simulation and modelling Object-oriented databases Hypertext, hype

Oracle, What is "No_Data_Found" in Oracle?

What is "No_Data_Found" in Oracle?

Write a perl program to design a computer game, Write a Perl program ghici....

Write a Perl program ghici.pl, one of the simplest computer games. The program should generate a random integer between 1 and 1000 and asks the user to guess it. If the user ?nds t

Java string handling, Expertsmind brings you unique solution in java assig...

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

Write a recursive procedure that computes number in integer, (a) Write a re...

(a) Write a recursive procedure (digits n) that computes the number of digits in the integer n using a linear recursive process. For example, (digits 42) should return 2 and (digit

Devlop personalized location based news service, The system you will develo...

The system you will develop should provide the following functionality to its users.     1.  Your system should allow the users to aggregate three different RSS feeds (they should

Pseudo code, I need help putting this into a flowchart constant c as Intege...

I need help putting this into a flowchart constant c as Integer = 3500 Constant CALORIESTOOUNCE as Integer = 219 Declare Sex as Character Declare Age as Integer Declare Weight as I

Determine the effect of class isze on test scores, Of the 6,325 kindergarte...

Of the 6,325 kindergarten students who participated in the study, almost half or 3,052 were eligible for a free lunch program. The categorical variable sesk (1 == free lunch, 2 = n

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