Course Code: DCAP305
Course Name: Principles of Software Engineering
Important instruction:
1. The question paper contains 5 questions out of which only one
question shall be allocated by the neutral examiner. The candidate should
attempt only the allocated questions out of the 5 given questions as per the
allocation key. The same should be cross verified by neutral examiner.
Q1. Write and explain the test cases to test registration form for admission in a University.
Q2. Draw an activity diagram for student registration for a seminar.
Q3. Draw a state chart diagram for a thermostat.
Q4 Draw a use case diagram for ATM.
Q5. Draw a Data Flow Diagram for online shopping.
Sure, I'll address each question one by one.
Q1: Test Cases for University Admission Registration Form
Test Case 1: Validate mandatory fields
Objective: Ensure all mandatory fields are present and validated.
Steps:
1. Open the registration form.
2. Try submitting the form without filling in any details.
Expected Result: The form should not be submitted and should display error
messages for each mandatory field.
Test Case 2: Validate Email Format
Objective: Ensure the email field accepts only valid email formats.
Steps:
1. Enter an invalid email (e.g., "user@domain", "userdomain.com").
2. Submit the form.
Expected Result: The form should not be submitted and should display an error
message indicating an invalid email format.
Test Case 3: Validate Phone Number
Objective: Ensure the phone number field accepts only valid phone numbers.
Steps:
1. Enter alphabets or special characters in the phone number field.
2. Submit the form.
Expected Result: The form should not be submitted and should display an error
message indicating an invalid phone number.
Test Case 4: Password Strength
Objective: Ensure the password meets strength requirements.
Steps:
1. Enter a password that does not meet the criteria (e.g., "12345", "password").
2. Submit the form.
Expected Result: The form should not be submitted and should display an error
message indicating the password does not meet the required strength.
Test Case 5: Validate Date of Birth
Objective: Ensure the date of birth is in the correct format and within a valid range.
Steps:
1. Enter an invalid date format or an unrealistic date of birth (e.g., future date).
2. Submit the form.
Expected Result: The form should not be submitted and should display an error
message indicating an invalid date of birth.
Test Case 6: Successful Registration
Objective: Ensure the form is submitted successfully with valid data.
Steps:
1. Fill in all the fields with valid data.
2. Submit the form.
Expected Result: The form should be submitted successfully, and the user should
receive a confirmation message.
Q2: Activity Diagram for Student Registration for a Seminar
An activity diagram visually represents the flow of activities during the student registration
process for a seminar.
plaintext
Copy code
+---------------------+
| Start |
+---------------------+
|
v
+---------------------+
| Open Registration |
| Form |
+---------------------+
|
v
+---------------------+
| Fill Personal |
| Details |
+---------------------+
|
v
+---------------------+
| Select Seminar |
| Details |
+---------------------+
|
v
+---------------------+
| Submit Form |
+---------------------+
|
v
+---------------------+
| Validate Details |
+---------------------+
| / \ |
| / \ |
| Valid? Invalid? |
+--------|------------+
| No
v
+---------------------+
| Display Error |
| Messages |
+---------------------+
|
v
|
Yes
|
v
+---------------------+
| Confirmation |
| Message |
+---------------------+
|
v
+---------------------+
| End |
+---------------------+
Q3: State Chart Diagram for a Thermostat
A state chart diagram represents the various states of a thermostat and the transitions between
those states.
plaintext
Copy code
+----------------------+
| Off |
+----------------------+
|
v
+----------------------+
| Set Temperature |
+----------------------+
|
v
+----------------------+
| Idle |
+----------------------+
|
+-------+-------+
| |
v v
+-------------------+ +--------------------+
| Heating | | Cooling |
+-------------------+ +--------------------+
| |
v v
+----------------------+
| Maintain Temperature |
+----------------------+
|
v
+----------------------+
| Off |
+----------------------+
Q4: Use Case Diagram for ATM
A use case diagram depicts the interaction between users (actors) and the system (ATM).
plaintext
Copy code
+----------------------+
| ATM System |
+----------------------+
| |
| +----------------+ |
| | Customer | |
| +----------------+ |
| | 1. Insert Card | |
| | 2. Enter PIN | |
| | 3. Select Trans| |
| | 4. Withdraw | |
| | 5. Deposit | |
| | 6. Check Balance| |
| | 7. Transfer Funds| |
| +----------------+ |
| |
+----------------------+
|
v
+---------------------+
| Bank Database |
+---------------------+
Q5: Data Flow Diagram for Online Shopping
A Data Flow Diagram (DFD) shows the flow of data within the online shopping system.
Context Diagram (Level 0):
plaintext
Copy code
+----------------------+
| Customer |
| |
| 1. Browse Products |
| 2. Add to Cart |
| 3. Make Payment |
| 4. Place Order |
+----------------------+
|
v
+----------------------+
| Online Shopping |
| System |
+----------------------+
|
v
+----------------------+
| Payment Gateway |
+----------------------+
|
v
+----------------------+
| Shipping Service |
+----------------------+
Level 1 DFD:
plaintext
Copy code
+----------------------+
| Customer |
| |
| 1. Browse Products |
| |
+----------------------+
|
v
+----------------------+
| Product Catalog |
| (1.0) |
+----------------------+
|
v
+----------------------+
| Shopping Cart |
| (2.0) |
+----------------------+
|
v
+----------------------+
| Checkout & Payment |
| (3.0) |
+----------------------+
|
v
+----------------------+
| Order Processing |
| (4.0) |
+----------------------+
|
v
+----------------------+
| Shipping & Delivery |
| (5.0) |
+----------------------+
These diagrams and test cases provide a comprehensive overview of the processes and
interactions within the specified systems.
4o