Programming Methods

Programming Methods

Task-1.1: Report 1

Table 1.1: A list of the number of days each room was booked for each month in the preceding 12 months

Room No

Month

Room Type

Family

Room

Double Room

Twin

Room

Single

Room

I

II

III

IV

I

II

III

I

II

III

IV

V

I

II

III

Jan

4

7

9

6

2

3

4

10

7

8

5

4

3

8

3

Feb

3

5

1

7

8

4

6

2

8

2

2

1

7

5

4

Mar

18

17

6

7

2

6

7

-

4

9

7

6

3

4

5

April

8

9

-

5

7

8

6

3

4

5

3

9

8

5

7

May

18

7

7

1

3

-

5

4

9

6

8

7

-

1

3

Jun

9

8

7

4

1

2

3

10

11

4

5

6

9

8

7

July

-

8

8

2

8

4

14

6

5

1

-

-

2

9

3

Aug

9

4

5

2

1

7

6

5

4

2

6

8

6

4

Sep

3

6

7

10

5

6

9

4

2

3

10

2

3

5

9

Oct

7

8

5

-

7

4

-

2

3

5

9

6

7

3

10

Nov

9

6

4

14

2

4

8

1

9

-

7

8

9

8

5

Dec

8

2

4

3

1

3

11

3

10

6

3

4

8

19

10

Open All files

1 = Open hotel booking file

2 = Open customers data files

3 = Open Rooms booking files

Booking Records

4 = Booking date

9 = Deposit amount

10 = Total

Room records

11 = Rooms Number

12 = Room Types

Customers Records

5 = Customers names

6 = Numbers of occupants

7 = Numbers of night

8 = Date of arrival

Task-1.2: Report 2

Table 1.2: A list of all room bookings for March month and day by day basis

Room Type

Family Room

Double Room

Twin Room

Single Room

Room

No

Date

I

II

III

IV

I

II

III

I

II

III

IV

V

I

II

III

1.3.2009

A

NA

A

NA

A

NA

A

A

NA

NA

A

NA

A

NA

A

2.3.2009

A

A

NA

A

A

NA

NA

A

NA

NA

A

A

A

NA

A

3.3.2009

NA

A

A

NA

NA

A

A

A

A

NA

A

NA

NA

A

NA

4.3.2009

A

A

A

A

NA

NA

A

A

NA

NA

A

A

NA

NA

A

5.3.2009

NA

A

A

A

A

NA

NA

A

A

NA

A

NA

A

NA

NA

6.3.2009

A

NA

A

NA

A

A

A

NA

NA

NA

A

A

A

A

A

7.3.2009

NA

NA

NA

A

NA

NA

NA

A

NA

NA

A

NA

NA

NA

NA

8.3.2009

NA

NA

A

NA

A

NA

A

NA

NA

NA

A

A

A

NA

NA

9.3.2009

A

NA

A

NA

NA

A

A

A

A

NA

A

NA

NA

A

A

10.3.2009

NA

A

NA

A

A

NA

A

NA

NA

NA

NA

NA

A

NA

NA

11.3.2009

A

NA

A

NA

NA

A

A

NA

NA

NA

NA

A

NA

A

A

12.3.2009

A

NA

A

A

NA

NA

A

NA

A

NA

NA

NA

NA

NA

A

13.3.2009

NA

NA

A

A

A

NA

A

NA

NA

NA

NA

NA

A

NA

NA

14.3.2009

A

NA

A

NA

A

A

A

NA

A

NA

NA

A

A

A

A

15.3.2009

A

A

NA

A

NA

NA

NA

NA

NA

NA

NA

NA

NA

NA

A

16.3.2009

NA

A

A

NA

NA

NA

A

A

A

A

NA

NA

NA

NA

NA

17.3.2009

NA

NA

NA

NA

A

NA

A

NA

NA

A

NA

NA

A

NA

NA

18.3.2009

A

NA

A

A

A

NA

A

NA

A

A

NA

A

A

NA

A

19.3.2009

NA

A

A

NA

A

NA

NA

NA

NA

A

A

NA

A

NA

NA

20.3.2009

A

NA

A

NA

NA

A

NA

A

A

A

A

A

NA

A

A

21.3.2009

NA

A

A

A

A

NA

NA

A

NA

A

A

NA

A

NA

NA

22.3.2009

NA

NA

A

NA

NA

NA

NA

NA

NA

A

A

NA

NA

NA

NA

23.3.2009

NA

A

NA

A

A

NA

NA

A

A

A

A

A

A

NA

NA

24.3.2009

NA

NA

A

NA

NA

NA

NA

A

NA

A

A

NA

NA

NA

NA

25.3.2009

NA

NA

A

NA

A

A

A

NA

NA

NA

NA

A

A

A

NA

26.3.2009

A

NA

A

NA

NA

NA

NA

A

A

NA

NA

NA

NA

NA

A

27.3.2009

NA

A

A

A

A

NA

A

NA

NA

A

NA

A

A

NA

NA

28.3.2009

A

A

A

A

A

A

NA

A

A

NA

NA

NA

A

A

A

29.3.2009

NA

A

A

NA

NA

NA

NA

NA

NA

A

NA

A

NA

NA

NA

30.3.2009

NA

NA

NA

A

A

A

A

A

A

A

NA

NA

A

A

A

31.3.2009

NA

A

NA

NA

NA

NA

A

NA

NA

NA

NA

NA

NA

NA

A

A = Available

NA= Not Available

Task-1.3: Report 3

Table 1.3: List of monthly incomes for room bookings over the last year

Jan

Feb

Mar

April

May

June

July

Aug

Sept

Oct

Nov

Dec

TOTAL

Family Rooms

$1300

$1000

$1150

$1250

$1000

$1800

$3000

$1700

$2050

$1700

$1300

$1400

$18650

Double Rooms

$1000

$1000

$1500

$2250

$870

$1100

$700

$950

$890

$1200

$1090

$1250

$32450

Twin Rooms

$2500

$1200

$1200

$1200

$920

$850

$1200

$800

$700

$ 800

$900

$780

$11850

Single Rooms

$900

$1000

$ 850

$3000

$780

$870

$ 950

$600

$780

$700

$670

$1000

$12100

Total income for all rooms($)

$ 87150

Open File

1= Open Customer files

2= Income Files

3= Room data Files

Close file

4= Close Customer Files

5= Close income files

6= Close room data files

7= Display Total Records

Task (2)

Flowchart for Report 1

Flowchart for Report 2

Flow Chart for Report (3)

Task (3)

3(a)

PROCEDURE: Confirmation sent

USE VARIABLE: today Type of Data Time

Arrival Type of Data Time

Input File Type of File

BEGIN

Open today Type of date time as Input

Read a record

From to day Type

DISPLAY “Enter Today Date”

ACCEPT Today

DISPLAY “Today”

WHILE NOT EOF (Arrival Date)

If arrival = Arrival Date

If (Today + two weeks = arrival) Then

Send Confirmation

END IF

END IF

END WHILE

END

3(b)

PROCEDURE: REPORT 1

USE VARIABLE: Month as type of, Total as Type of Integer

BEGIN

DISPLAY “Choice Month”

ACCEPT Month

OPEN “Each Room File”

Total = 0

WHILE NOT EOF

IF READ Record from file

If DISPLAY “Date”

Total = Total + Booking

END IF

END WHILE

DISPLAY Month

DISPLAY “Room Type” & “Room No.”

CLOSE FILE

END.

3(c) Pseudo code for reports Main Menu

Program : Welcome Hotel User Checked Application

User Variable : User Name Type of String

Password Type of String

BEGIN

DISPLAY “Login Welcome Hotel”

DISPLAY “User Permission Check”

DISPLAY “User Name”

DISPLAY “Password”

DISPLAY “Login”

DISPLAY “Cancel”

IF ACCEPT User Name

ACCEPT Password

IF READ a record User Name and Password THEN

DISPLAY “Main Menu”

END IF

ELSE

DISPLAY “Try Again Error”

ELSE IF on Click Cancel=True THEN

Exit System

END IF

END

Task (4)

Test Plan

Table 4.1

Program Name

Report 1

Purpose

A list of No. of days each room was booked for each month

Task Data

See table (2)

Expected Result

To know A list of No. of days each room was booked

Table 4.2

Month

January

February

March

Day

5

7

14

Room types

Double

Single

Twin

Room No.

3(d.2)

3(s.3)

3(t.1)

Desks Checks

PROCEDURE: REPORT 1

USE VARIABLE: Month as type of, Total as Type of Integer

BEGIN

DISPLAY “Choice Month”

ACCEPT Month

OPEN “Each File Room”

Total = 0

WHILE NOT EOF

IF READ Record from file

If DISPLAY “Date”

Total = Total + Booking

END IF

END IF

DISPLAY Month

DISPLAY “Room Type” & “Room No.”

CLOSE FILE

END FILE.

Dry Runs

PROCEDURE: REPORT 1

USE VARIABLE: Month as type of, Total as Type of Integer

BEGIN

1. DISPLAY “Choice Month”.

2. ACCEPT Month

3. OPEN “Each File Room”

4. Total = 0

5. WHILE NOT EOF

6. IF READ Record from file

7. IF DISPLAY “Date”

8. Total = Total + Booking

END IF

END IF

9. DISPLAY Month

10. DISPLAY “Room Type” & “Room No.”

CLOSE FILE

END

Table 4.3

Step No.

File 1

Total

Date

Condition 1

Condition 2

Output

1.

Choice Month

2.

Each File

3.

0

4.

T

5.

Read a record

6.

14.2.09

7.

1

8.

FEBRUARY

9.

Room type & No.

 

Task (5)

Class Diagram

Hotel name as String

Room Types as String

Room No. as Integer

Booking No as Integer

Booking Code as Integer

Arrival Date as Integer

No. of night as Integer

Total payment as Real

+check rooms booking

+calculate rooms changes

+booking information

+calculate the cancel room booking

+making the total income information

Task (6)

Review for the assignment

In the Task - 1, it is that assumed that the society secretary requirement to create three reports by using the JSP Technical and Methodology. Report 1 is a list of the number of days each room was booking for each month and the Report 2 is a list of all room booking for any selected calendar month and the Report 3 is a list of monthly income received for room booking over the last year.

In Task - 2, it is assumed to create “Flowchart” for three reports produced in the Task - 1.Flowcharts are displayed by Report-1 and Report-2.

In Task - 3, has three partitions and the procedure that will prove for customer that is included in the program that the club secretary will use when checking how many people are allowed into meetings, Procedure that it is needed pseudo code.

In the Task - 4, it is assumed to produce “Test Plan, Desks Checks, and Dry Runs”. It is assumed that it must need Test data.

In the Task - 5, it is a about UML modeling technique. It is required to produce top level class diagram for the hotel system, the top level use case diagram and top use case analysis that show the actors and any stereotyped dependencies, and use case diagrams are for adding a room booking to the database, Sending a booking confirmation to a customer, printing a report and a sequence diagram for adding a room booking database.

JSP-Jackson Structured Programming

This is a system design methodology that transforms a problem structure into a program structure which can solve the problem.JSP uses the Hierarchical modeling technique very intensively. It has three stages: At the final part of Stage 2 uses a form of pseudo code to define the detailed program design. However, it is not as suitable as UML for an object-oriented of the programming language.

UML- Unified Modeling Language

It allow for code to be export as diagram and offer a ready-made modeling language that helps developers to communicate easily.UML provides a means of extending the core concepts of the language and independent of programming language and development processes. It is also encourages the growth of the OO tools market that supports top-level development concepts such as collaborations, frameworks, patterns and components. It integrates the best practices, addresses the issues of the scale inherent in complex, mission-critical systems, Creates a modeling language usable by both the humans and machines. Good upfront design will shorten development time. A standard model means easier communication between development teams. And it is an official standard. So, it is distinct that it is more suitable for and the object oriented programming language than JSP.

 

Please be aware that the free essay that you were just reading was not written by us. This essay, and all of the others available to view on the website, were provided to us by students in exchange for services that we offer. This relationship helps our students to get an even better deal while also contributing to the biggest free essay resource in the UK!