A data structure diagram (DSD) is the data modeling or the result of a process of hierarchical decomposition of a complex data area, which is subdivided as far as possible and reasonable. Data structure diagrams are also useful for documenting complex data entities.
Below are the data structure diagrams of report 1:
A badminton club consist a members that divide into many extract (selections) such as Member Name, Member Number, Address, Contact Telephone Number, Membership Level (adult or junior), Date of Payment and amount Paid.
Below are the data structure diagrams of report 2:
A badminton club consist a fixtures that divide into many selection such as the following below:
Team
Opponent
Matches Won
Matches Lost
Date of Match
What is PSDs?
It is the preliminary program structures project planning, design and management. The purpose is for project topics including design and planning. It also can make use of various modeling methods and technique.
Below are the preliminary program structures of report 1:
Report 1 consists of:
Header
Report Body
Footer
Membership Level Section has a selection that divides into two selections such as:
Member Details
Total of No. Members
Member Details also has a selection that divides into three selections such as the following below:
Member Number
Member Name
Member TelNo
Below are the preliminary program structures of report 2:
Report 2 consist of:
Report Header
Report Body
Report Footer
Team Section divides into two selections such as Fixtures Details and Total No of Matches.
Fixtures Details has a selection that divides into four selections such as the following below:
Fixture Date
Matches Won
Matches Lost
Opponent
Total No of Matches has a two selection such as:
Matches Won
Matches Lost
In report 1 consists of:
Initialize to open files.
Process to process files.
Closing to close files.
Process file consists of:
Print Report Header
Print Report Body
Print Report Footer
Print Membership Level Section has a selection that divide into three selections such as:
Print Membership Header
Print Member Details
Total of No. Members
Print Members Details divide into three selections such as:
Print Member Number
Print Member Name
Print Member TelNo
In report 2 consists of:
Initialize to open files.
Process to process files.
Closing to close files.
Process file consists of:
Print Report Header
Print Report Body
Print Report Footer
Print Team Section has a selection that divide into three selections such as:
Print Team Header
Print Fixtures Details
Print Team Totals
Print Fixtures Details has a selection that divide into four selections such as:
Print Fixture Date
Print Matches Won
Print Matches Lost
Print Opponent
Print Team totals have a two selection such as the following below:
Print Matches Won
Print Matches lost
TASK 2
Question:
Draw a flowchart for each of the two reports specified in Task 1. [6 marks for each report]
Report 1
Report 1 is a flowchart or a data structure. At first we click Start to open another file which is a Boolean. If YES, then go to Open File, and then go to Print Header File. If NO, just go direct to END program.
After Print Header File, there is a decision. If EOF YES, go to Print report body, then Print report footer, then Close file and lastly go to End. If EOF NO, go to Read Record. There is also a Boolean after Read Record. The decision is If Member Junior.
If the decision is YES, just go through Read Junior Member Number, Read Junior Member Name, Read Junior TelNo, and Add1 Total Junior. After this go back to the decision IF EOF.
If the decision is NO, just go through Read Adult Member Name, Read Adult Member Number, Read Adult Member Name, and Read Adult Member TelNo and Add 1 Total adult. After this go back to the decision IF EOF. Then it will go automatically to End program step by step.
Report 2
Above is the report 2 flowchart. At first is the Start, next is input year. After that Open File, then Print Header File until find the decision which is If EOF. If EOF YES, go to Print report body, then Print report footer, then Close file and lastly go to End. If EOF NO, then it goes to Read Record. After Read Record, there are three decisions such as Team 1, Team 2 and Team Junior.
If Team 1 the decision is YES, then go to Save 1st Team Fixture Date  Save Team 1 Opponent  Save Matches Won  Add Matches Won  Save Lost  Add Matches Lost.
If Team 2 the decision is YES, then go to Save Team 2 Fixture Date  Save Team 2 Opponent  Save Matches Won  Add Matches Won  Save Lost  Add Matches Lost.
If Team Junior the decision is YES, then go to Save Team Junior Fixture Date  Save Team Junior Opponent  Save Matches Won  Add Matches Won  Save Lost  Add Matches Lost.
TASK 3
Question:
a) Write pseudocode for each of the two reports described in Task 1. [7 marks for each report]
b) Write pseudocode for a reports main menu. Note: you are not expected to write pseudocode for the options, only the code to navigate the menu is required. [6 marks]
For Task 3, we were required to create a pseudo code based on the flowchart that was created in Task 2. This question comprises of two sections where the first part consists of pseudo code for printing both Reports namely Report 1 and Report 2. However, Section two pseudo codes are to create a pseudo code for a main menu that contains all the main functions of the system. The pseudo code is shown below:
REPORT 1
Begin
USE VARIABLES: CurrentMember OF TYPE BOOLEAN
AdultTotal, JuniorTotal OF TYPE INTEGER
Member of TYPE STRING
JuniorMemberNumber, AdultMemberNumber OF TYPE INTEGER
AdultMemberName, JuniorMemberName OF TYPE STRING
AdultMemberTelNo, JuniorMemberTelNo OF TYPE STRING
OPEN FILE
PRINT Header File
AdultTotal=0
JuniorTotal=0
DO WHILE NOT EOF
Read Record
If member="adult" THEN
Read AdultMemberNumber
Read AdultMemberName
Read AdultMemberTelNo
AdultTotal=AdultTotal+1
Else
Read JuniorMemberNumber
Read JuniorMemberName
Read JuniorMember Name
Read JuniorMemberTelNo
JuniorTotal=JuniorTotal+1
END IF
END WHILE
PRINT REPORT BODY
PRINT REPORT FOOTER
CLOSE FILE
END PROGRAM
REPORT 2
Begin
USE VARIABLES: CurrentMember OF TYPE BOOLEAN
AdultTotal, JuniorTotal OF TYPE INTEGER
Member of TYPE INTEGER
Team1FixtureDate, Team1Opponent,
Team2FixtureDate, Team2Opponent,
JuniorFixtureDate, JuniorOpponent, OF TYPE STRING
Team1MatchesWon, Team1MatchesLost,
Team2MatchesWon, Team2MatchesLost,
JuniorMathchesWon, JuniorMatchesLost OF TYPE INTEGER
Team Category OF TYPE STRING
INPUT YEAR
OPEN FILE
PRINT Header File
DO WHILE NOT EOF
Read Record
If Team= "1" THEN
Save 1stTeamFixturesDate
Save Team1stOpponent
Save MatchesWon
Add MatchesWon = MatchesWon + 1
Save MatchesLost
Add MatchesLost = MatchesLost + 1
ElseIf Team= "2" THEN
Save Team2ndFixturesDate
Save Team2ndOpponent
Save MatchesWon
Add MatchesWon = MatchesWon + 1
Save MatchesLost
Add MatchesLost = MatchesLost + 1
Else
Save TeamJuniorFixturesDate
Save TeamJuniorOpponent
Save MatchesWon
Add MatchesWon = MatchesWon + 1
Save MatchesLost
Add MatchesLost = MatchesLost + 1
END IF
END WHILE
PRINT REPORT BODY
PRINT REPORT FOOTER
CLOSE FILE
END PROGRAM
MAIN MENU
Begin
Use Variables: Display Log-In Menu
Enter UserName
Enter Password
If username == secretary or captain
ElseDisplay "You are not allowed to enter!"
END PROGRAM
DISPLAY MAIN MENU
CASE 1:
PRINT REPORT 1
CASE 2:
PRINT REPORT 2
CASE 3:
Add New Member
CASE 4:
Pay Membership
OTHERWISE
EXIT
Task 4
Question:
Test the pseudocode written in Task 3a) by producing test plans, desks checks and dry runs.
This task shows the pseudocode for the two Reports namely Report1 and Report2. Report 1 deal with list of paid-up members ordered by their membership level while Report 2 deals with the list of all fixtures played by each team in any year. This section divided into three such as the following below:
Desk Checking
Test Plans
Dry Runs
REPORT 1
DESK CHECKING
NO.
CHECKING POINTS
DATA TYPE
FUNCTIONS
1
Current Member
Boolean
To verify the member if it is a current valid member.
2
Adult Total
Integer
To count the existing adult total members.
3
Junior Total
Integer
Counting the current junior total members.
4
Member
String
To differentiate between junior and adult members
5
JuniorMemberNumber
Integer
To verify junior member number.
6
AdultMemberNumber
Integer
To store the membership number for adult members
7
AdultMemberName
String
To identify the names of the adult membership
8
JuniorMemberName
String
To identify the names of member.
9
AdultMemberTelNo
String
To verify the adult telephone number.
10
JuniorMemberTelNo
String
To verify the junior telephone number
Test Data
Member
Result
Adult
Read Adult Membership Number
Name,
TelNumber,
Add/Increment 1 to Total Adult
Junior
Read Junior Membership Number
Name,
TelNumber,
Add/Increment 1 to Total Junior
Pseudocode Listing
No
Code
1
AdultTotal=0
2
JuniorTotal=0
3
DO WHILE NOT EOF
4
ReadRecord
5
If member="adult" THEN
Read AdultMemberNumber
Read AdultMemberName
Read AdultMemberTelNo
6
AdultTotal=AdultTotal+1
Else
Read JuniorMemberNumber
Read JuniorMemberName
Read JuniorMemberTelNo
7
JuniorTotal=JuniorTotal+1
8
END IF
9
END WHILE
Dry Run
No
TotalAdult
TotalJunior
NOT
EOF
MembershipLevel
MembershipLevel="Adult"
Output
1
0
2
0
3
True
4
Adult
5
True
Process Adult Record
6
3
True
4
Junior
5
False
Process Junior Record
7
1
3
False
Proceed
with
Printing
Report
REPORT 2
NO.
CHECKING POINTS
DATA TYPE
FUNCTIONS
1
CurrentMember
Integer
To verify the current member
2
AdultTotal
Integer
To count the total of team 1 members
3
JuniorTotal
Integer
To count the total of team 2 members
4
Member
Integer
To count the total of junior team members
5
Team1FixtureDate
String
To verify team 1 fixture date
6
Team1Opponent
String
To verify team 1 opponent
7
Team2FixtureDate
String
To verify team 2 fixture date
8
Team2Opponent
String
To verify team 2 opponent
9
JuniorFixtureDate
String
To verify junior team fixture date
10
JuniorOpponent
String
To verify junior team opponent
11
Team1MatchesWon
Integer
To verify the team 1 matches won
12
Team1MatchesLost
Integer
To verify the team 1 matches lost
13
Team2MatchesWon
Integer
To verify the team 2 matches won
14
Team2MatchesLost
Integer
To verify the team 2 matches lost
15
JuniorMatchesWon
Integer
To verify the junior matches won
16
JuniorMatchesLost
Integer
To verify the junior matches lost
17
Team Category
String
To divide the team into category
Test Data
YearOfReport
YearOfFixtureDate
Team
Test Result
2010
2010
FirstTeam
Read FirstTeam Record, Add NoOfMatchesWon and NoOfMatchesLost
2010
2010
SecondTeam
Read SecondTeam Record, Add NoOfMatchesWon and NoOfMatchesLost
2010
2010
JuniorTeam
Read JuniorTeam Record, Add NoOfMatchesWon and NoOfMatchesLost
2011
2011
FirstTeam
Check Next Record
Pseudocode Listing
No
Code
1
INPUT YEAR
2
OPEN FILE
3
PRINT Header File
4
DO WHILE NOT EOF
5
Read Record
6
If Team= "1" THEN
7
Save 1stTeamFixturesDate
8
Save Team1Opponent
9
Save MatchesWon
10
Add MatchesWon = MatchesWon + 1
11
Save MatchesLost
12
Add MatchesLost = MatchesLost +1
13
ElseIf Team= "2" THEN
14
Save Team2FixtureDate
15
Save Team2Opponent
16
Save MatchesWon
17
Add MatchesWon = MatchesWon + 1
18
Save MatchesLost
19
Add Matches Lost = MatchesLost +1
20
Else
21
Save TeamJuniorFixtureDate
22
Save TeamJuniorOpponent
23
Save MatchesWon
24
Add MatchesWon=MatchesWon+1
25
Save MatchesLost
26
Add MatchesLost=MatchesLost+1
27
END IF
28
END WHILE
Dry run
NO
Team
1
Team
2
Team Junior
Year
NOT EOF
Team
Team
1
Team
2
Team Junior
Output
W
L
W
L
W
L
W
L
W
L
W
L
1
0
2
0
3
0
4
0
5
0
6
0
7
2010
8
True
9
First Team
10
Process First Team Record
11
5
12
5
13
1f
14
1
15
TRUE
16
Second Team
17
Process SecondTeam
18
3
19
False
20
Junior Team
21
2
22
4
23
4
24
2
25
Process Junior Team
TASK 5
Question:
Explain the options that are available to modify the system so that it records how members pay their annual membership fees with the following options:
ï‚· Full annual membership by cheque
ï‚· Full annual membership by cash
ï‚· Monthly membership by cash
Explain how the system would be modified to record these different payment types. In particular, explain the implications of allowing monthly membership payments.
For Task 5, options to modify the system so that it records how members pay their annual membership fees is by adding a new attribute called Payment Type. The following diagrams are to be modified are:
Physical DSD File Structures (Report1)
Logical DSD File Structures (Report 1)
Detailed program specification PSD (Report 1)
Flowchart (Report 1)
Pseudo code (Report 1)
Physical DSD File Structures (Report 1)
A badminton club consist a member that divide into many extract (selections) such as Member Name, Member Number, Address, Contact Telephone Number, Membership Level (adult or junior), and Date of Payment and amount Paid.
Payment Type Mode is the new one added for members.
Logical DSD File Structures (Report1)
Report 1 consists of:
Header
Report Body
Footer
Membership Level Section has a selection that divides into two selections such as:
Member Details
Total of No. Members
Member Details also has a selection that divides into three selections such as the following below:
Member Number
Member Name
Member TelNo
Member Payment Type is the new one added fro Members Details.
Detailed program specification PSD (Report 1)
In report 1 consists of:
Initialize to open files.
Process to process files.
Closing to close files.
Process file consists of:
Print Report Header
Print Report Body
Print Report Footer
Print Membership Level Section has a selection that divide into three selections such as:
Print Membership Header
Print Member Details
Total of No. Members
Print Members Details divide into three selections such as:
Print Member Number
Print Member Name
Print Member TelNo
Print Member Payment Type is the new one added for Print Member Details.
Flowchart (Report 1)
Pseudo code (Report 1)
START
Use Variables: HasPaid OF TYPE Boolean
MemberPaymentType OF TYPE String
PaymentMode OF TYPE String
OPEN FILE
Print Header File
Do while NOT EOF
Read Record
If membership type = "Monthly" THEN
If HasPaid = Yes
Pay Membership by Cash
End If
Else
If HasPaid = Yes
If PaymentMode = Cheque
Pay Membership by Cheque
Else
Pay membership By Cash
End If
End If
Print receipt
End If
Print Body
Print Footer
Close File
End
Task 6
Question:
Give a detailed explanation of how modeling the new system using object-oriented (OO) methods would differ from the methods used in tasks 1 - 5 above. Describe the different diagrams that would be used and explain the steps taken to design the system.
Introduction:
Use case diagram
It is concentrate to the user point of view which is point to the person using the system.
Sequence diagram
Sequence diagram shows the relationship between specific objects and allows us to study how a set object interacts in time.
Component diagram
It is for defining software system components and it is useful for larger team.
State Chart diagram
A state chart diagram is a view of a state machine that models the changing behavior of a state.
Object Oriented
It is a programming language model which is organized around objects rather than actions and data rather than logic.
Collaboration diagram
It is a cross between an object diagram and sequence diagram.
Below are some of the diagrams:
Use Case Diagram
A club secretary must Log In first in order to manage membership level, manage members and print report. Some goes to captain, treasurer and member. Use cases should explore scenarios which aim to satisfy the needs of those using the system.
Sequence Diagram
The diagram above shows that the process is going step by step. If the password was entering incorrectly, it will be return back to re-enter password. If the password enter was correct then retrieve records ïƒ verification of membership level ïƒ handle payments by each member ïƒ proceed with printing report and lastly is print the report.
Activity Diagram
Class Diagram
The diagram above shows that it is a class structure. Each class structure is divided into three parts. At the top is the name of class, in the center it is called attribute and lastly is the behaviors which is at the bottom.
Task 7
Question:
In no more than 500 words, write a review of your work. Describe any assumptions you have made, any weaknesses in your work and any changes you could introduce to improve your work. For the different methods and techniques you have used or described in tasks 1-6, suggest which methods would be appropriate for different programming languages.
Introduction
In this task we have to create a report to explain what we have done before in task 1 until task 6. It explain about the assumptions such as all members are cannot members, all members have paid, members who have not eligible to be in the list and the year that is accepted by system need to be verified. Below are some of the advantages and disadvantages of JSP, Flowchart, Pseudocode and Object Oriented and with an explanation.
JSP (Jackson Structure Programming)
Jackson Structure Programming is a method of structure for modeling and design. It is also a software development method. Jackson Structure Programs have strength such as rational, consistent and teachable. In structure programming there is an iteration, selection and sequence. One of the disadvantages of Jackson Structure Program is the method is very complicated to use.
Flowchart
Flowchart is a diagram that shows the step of process with the combination of shapes, text and lines. The good thing of flowchart is problem can be analyzed by the help of flowchart. It also helps in debugging process. Flowcharts are better way of communicating the logic of a system to all concerned. Sometimes the reproduction of flowchart become problem, it is because the detail is complicated.
Pseudocode
Pseudocode is an artificial and structure of English for describing algorithms. Some of the advantages are easy to use and create with a text editor because it uses English like statement. Pseudocode required only is very little specific syntax. There are some weaknesses of pseudocode like not visual, so the standard is not accepted until it varies from company to company.
Object-Oriented
Object Oriented offers a different way to think about software systems. It is a programming language model which is organized around objects rather than actions and data rather than logic. The strength of Object Oriented is easy to maintain and modify existing code as new objects can be created with small differences to existing ones. One of the weaknesses about Object Oriented is it can increase burden on part of Object Oriented Programmer developer.
Which one is the best?
My opinion is the flowchart is the best among all of them. It is because flowchart is easy to use or create with a simple structure diagram and it also can view fully details of the process. So if there is any problem, we can see it more easily.