Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
20 views50 pages

OOSE LAB MANUAL (Completed Version) - 1

The document outlines the curriculum and laboratory instructions for the CCS356 Object Oriented Software Engineering Lab for the academic year 2024-2025. It includes a bonafide certificate template, general lab instructions, course objectives, a list of experiments, and detailed descriptions of specific experiments related to software requirements specification, use case modeling, and UML diagram creation. Additionally, it emphasizes the importance of following safety protocols and proper lab conduct.

Uploaded by

nainudigitals
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views50 pages

OOSE LAB MANUAL (Completed Version) - 1

The document outlines the curriculum and laboratory instructions for the CCS356 Object Oriented Software Engineering Lab for the academic year 2024-2025. It includes a bonafide certificate template, general lab instructions, course objectives, a list of experiments, and detailed descriptions of specific experiments related to software requirements specification, use case modeling, and UML diagram creation. Additionally, it emphasizes the importance of following safety protocols and proper lab conduct.

Uploaded by

nainudigitals
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

(ACADEMIC YEAR: 2024- 2025)

CCS356 OBJECT ORIENTED

SOFTWARE ENGINEERING LAB

R - 2021

Name :

Register Number :

Department :

Year/Semester :
BONAFIDE CERTIFICATE

This is to certify that this is the Bonafide Record of


work done by Mr. /Ms.
………………………………………………………….................
....
Register Number ............................................................................................... of

III YEAR / VI Semester – .............................................................................. in the

CCS356 – OBJECT ORIENTED SOFTWARE ENGINEERING LABORATORY


during the

academic year 2024-2025.

Staff In-Charge Head of the Department

Submitted for the Anna University B.E./ B.Tech Practical Examination held on

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Internal Examiner External Examiner


GENERAL INSTRUCTIONS FOR LABORATORY
All the students should report to the lab in time,failing which,will not be permitted.
The students should brief the safety precaution and procedure for the particular experiment to
the faculty before starting the experiment.
While conducting experiment show the sample reading to the faculty and get approval for the
reading.
After completing the experiment do the calculation,graph and analysis of results and get the
sign from the faculty.
Every lab class students should submit the lab record book failing which they are not permitted
to perform any experiment on the day.
Students are instructed to do the experiments individually.Students are strictly instructed to
follow the lab safety instructions.
After completing the experiments clean the workspace and switch off the electrical connections.
Switch off the lights and fans not in use.
Damaging of equipment and tools by improper handling will be taxed.Handle the precision
instruments carefully.
Keep the instruments in the appropriate places.Keep distance with rotating and hot
components. Wear goggles and gloves where ever needed.
Handle the greasy components with care.
Avoid watches,ornaments while doing experiments.
Don’t operate the equipment’s without knowing the procedure.Misbehaviour in the labs
will be viewed seriously.
Wear proper dresscode(Formal dressing with shoes)Report the accidents immediately to the
faculty in-charge.

FOR COMPUTER LABS


Don’t use pendrive,memory card and other electronic gadgets without permission.Without
prior permission don’t install / uninstall any software not related to lab.
Save the worked file in your login folder only.
After completing the experiments shutdown the system properly and switch off the electrical
connection
CCS356 OBJECT ORIENTED SOFTWARE ENGINEERING

Course Objectives:
• To understand Software Engineering Lifecycle Models.
• To Perform software requirements analysis
• To gain knowledge of the System Analysis and Design concepts using UML.
• To apply software testing and maintenance approaches
• To work on project management scheduling using DevOps
List of Experiments
1.Identify a software system that needs to be developed.
2. Document the Software Requirements Specification (SRS) for the identified system.
3. Identify use cases and develop the Use Case model.
4. Identify the conceptual classes and develop a Domain Model and also derive a Class
Diagram from that.
5. Using the identified scenarios, find the interaction between objects and represent them using
UML Sequence and Collaboration Diagrams
6. Draw relevant State Chart and Activity Diagrams for the same system.
7. Implement the system as per the detailed design
8. Test the software system for all the scenarios identified as per the usecase diagram
9. Improve the reusability and maintainability of the software system by applying appropriate
design patterns.
10. Implement the modified system and test it for various scenarios.
Course Outcomes:
CO1: : Compare various Software Development Lifecycle Models
CO2: : Evaluate project management approaches as well as cost and schedule estimation strategi
CO3: : Perform formal analysis on specifications
CO4: Use UML diagrams for analysis and design.
CO5: Architect and design using architectural styles and design patterns, and test the system

Content Beyond the syllabus

1. Set up a CI/CD system using Jenkins

2. Configuration Management with Git and GitHub


Index
Marks Awarded-
Day to Day Sign of
activities the
Date Name of the Experiment Faculty

experiment (5
Performing the

Record Work
Completion of
S. with

(5 Marks)
Technical
Knowledge
Attendance
No Date

Document the Software Requirements


1 Specification (SRS) for the Course registration
system.
2 Identify use cases and develop the Use Case model
for Course registration system

3. Identify the concepptual classes and develop a


Domain Model and also derive a Class Diagram
from that for Course registration system
4 Using the identified scenarios, find the interaction
between objects and represent them using UML
Sequence and Collaboration Diagrams for course
registration system
5. Draw relevant State Chart and Activity Diagrams
for the Course registration system

6 Implement the Course registration system as per


the detailed design

7 Test the Course registration system for all the


scenarios identified

8 Document the Software Requirements


Specification (SRS) for the Exam registration
system
9 Identify use cases and develop the Use Case model
for Course registration system for Exam
registration system
10 Identify the conceptual classes and develop a
Domain Model and also derive a Class Diagram
from that for Exam registration system
11 Using the identified scenarios, find the interaction
between objects and represent them using UML
Sequence and Collaboration Diagrams for Exam
registration system
12 Draw relevant State Chart and Activity Diagrams
for the Exam registration system
13 Implement the Exam registration system as per the
detailed design
14 Test the Exam registration system for all the
scenarios identified
Content Beyond the Syllabus
Set up a CI/CD system using Jenkins
1.
Configuration Management with Git and GitHub
2.
Ex.No:1

SOFTWARE REQUIREMENT SPECIFICATION (COURSE REGISTRATION SYSTEM)

AIM:
To prepare Software Requirement Specification for the course registration system.

Problem Analysis:
A Course Registration System is a critical application used by educational institutions to manage the enrollment of
students in academic courses. Before designing such a system, it is essential to analyze the problem from various
perspectives.

1. Current Challenges in Manual/Existing Systems


• Time-Consuming Process: Manual registrations involve long queues and paperwork, leading to delays.
• Human Error: Possibility of incorrect data entry, scheduling conflicts, or exceeding course capacity.
• Poor Transparency: Students lack real-time information about available seats, course prerequisites, or their
schedules.
• Limited Access: Registration may only be possible during office hours and requires physical presence or
outdated interfaces.
• Inefficient Management: Admins and faculty struggle to update course offerings and manage enrollment
without a centralized system.

Problem Statement:
In educational institutions, managing course enrollments efficiently is critical to ensuring a smooth
academic experience for both students and administrative staff. Traditional paper-based systems or poorly
integrated digital tools can lead to delays, over-enrollment, and scheduling conflicts.
Problem:
Currently, many universities and colleges face challenges with manual or outdated course registration processes,
leading to inefficiencies such as:
• Long queues for enrollment.
• Overlapping class schedules.
• Lack of real-time course availability updates.
• Limited student access to course information.
• Difficulty in tracking prerequisites and course limits.

# Software Requirements Specification (SRS)

1. Introduction
This document specifies the requirements for the Course Registration System, a Python application with a Tkinter
GUI that allows users to register, log in, and manage course enrollments.

2. Overall Description
- The system is intended for demo/educational use.
- It supports up to 10 users in an in-memory database.
- Users can register, log in, and select from three available courses.

3. Functional Requirements
- User registration with username, password, email, date of birth, and course selection (multiple allowed).
- User login with username and password.
- Only registered users can log in.
- After login, users can view and add courses (if not already registered for all).
- Store user data for up to 10 users.

4. Non-Functional Requirements
- Simple, left-aligned Tkinter GUI.
- No persistent backend; all data is in-memory.
- Designed for maintainability and reusability.

5. Constraints
- Maximum of 10 users.
- No persistent storage.

6. Assumptions and Dependencies


- Python 3.x and Tkinter are available on the system.

RESULT:
Thus the SRS document for Course registration system is prepared successfully
Ex. No : 2 Identify use cases and develop the Use Case model for Course
registration system

AIM:
To Identify use cases and develop the Use Case model for the course registration system

Procedure:

1. Identify the primary actors


2. Define the main use cases (functions the system provides)
3. Represent the relationships between actors and use cases in a diagram

Step 1: Identify Actors


Actor Description
Student Registers, views, or drops courses
Administrator Manages course offerings, schedules, and reports
Faculty Views courses and enrolled students
System Automated role, handles time checks, notifications

Step 2: Identify Use Cases


For Student
• Login/Logout
• View available courses
• Register for course
• Drop course

For Administrator
• Login/Logout
• Add/edit/delete course
For Faculty
• Login/Logout
• View assigned courses
• View enrolled students
YOU HAVE TO DRAW THE UML USE CASE DIAGRAM USING STAR UML AND ATTACH HERE

Result:

Thus Identifed use cases and develop the Use Case model for the course registration system successfully.
Ex. No : 3 Identify the conceptual classes and develop a Domain Model and also derive a Class Diagram from that.

AIM:
Identify the conceptual classes and develop a Domain Model and also derive a Class Diagram from that for the
course registration system

Procedure:

Identify Conceptual Classes


Conceptual classes represent real-world entities involved in the system. For a course registration system, the key
conceptual classes include:
Conceptual Class Attributes Relationships
Student studentID, name, email, program Registers for Courses
Course courseID, title, description, credits, capacity Offered by Department, Taken by Students
Instructor instructorID, name, email Teaches Courses
Registration registrationID, date, status Connects Student & Course
Schedule day, startTime, endTime, room Linked to Courses
Prerequisite prerequisiteCourseID Required for a Course
Admin adminID, name, email Manages Courses & Registrations

Step 2: Domain Model (Textual Representation)


Associations
• A Student can register for many Courses (through Registration).
• A Course can have multiple Students.
• A Course is taught by one Instructor.
• A Department offers multiple Courses.
• A Course can have multiple Prerequisites.
• A Schedule is associated with each Course.

YOU HAVE TO DRAW THE CLASS DIAGRAM USING STAR UML AND ATTACH HERE

Result:

Thus we drawn the class diagram using star uml successfully.


Ex. No : 4 Draw the uml Squence and collaboration diagram for the course registration system

AIM:
Using the identified scenarios, find the interaction between objects and represent them using UML Sequence and
Collaboration Diagrams for the course registration system

PROCEDURE:
To create UML Sequence and Collaboration Diagrams for a Course Registration System, we will:
1. Select key scenarios.
2. Identify the objects involved.
3. Model their interactions over time (Sequence Diagram) and structurally (Collaboration Diagram).
Selected Scenarios
1. Student Registers for a Course
Steps involved:
1. Student logs in.
2. Views course catalog.
3. Selects a course.
4. System checks prerequisites and seat availability.
5. System registers the student and confirms registration.

UML Sequence Diagram


Objects:
• :Student
• :CourseCatalog
• :Course
• :RegistrationService
• :Database

YOU HAVE TO DRAW THE SEQUENCE DIAGRAM USING STAR UML AND ATTACH
COLABRATION DIAGRAM

YOU HAVE TO DRAW THE COLABRATION DIAGRAM USING STAR UML AND ATTACH

RESULT:
Thus find out the interaction between the objects and drawn the uml sequence diagram and
collaboration diagram.
Ex. No : 5 Draw relevant State Chart and Activity Diagrams for the same system.

AIM:

To Create State Chart and Activity Diagrams for a Course Registration System based on relevant system states and actions.

PROCEDURE:
To create State Chart and Activity Diagrams for a Course Registration System based on relevant system states and
actions.
Procedure:
Step 1: Identify Relevant States (for a Student)
In the context of Course Registration, a Student goes through the following states:
States:
1. Start
2. Logged In
3. Viewing Courses
4. Selecting Course
5. Checking Prerequisites
6. Checking Course Capacity
7. Course Registered

YOU HAVE TO DRAW THE STATE CHART DIAGRAM USING STAR UML AND ATTACH HERE

ACTIVITY DIAGRAM

Step 1: Identify Activities


The key activities a student performs during course registration:
Main Activities:
1. Start
2. Login
3. View Course Catalog
4. Select Course
5. Check Prerequisites
6. Check Course Capacity
7. Register for Course
8. Show Confirmation
9. Logout / Exit

YOU HAVE TO DRAW THE Activity DIAGRAM USING STAR UML AND ATTACH HERE
RESULT:
Thus identified the system states and action, drawn state chart diagram and activity diagram
Exp. No : 5 Implement the Course registration system as per the detailed design

AIM:
To Implement the Course registration system as per the detailed design

PROCEDURE:
"""
main.py

Tkinter GUI for the Course Registration System.

- Allows user registration, login, and course management.


- Interacts with CourseRegistrationSystem for business logic.
"""

import tkinter as tk
from tkinter import messagebox
from course_registration_system import CourseRegistrationSystem

class App:
def __init__(self, root):
self.root = root
self.set_window_size()
self.root.title("Course Registration System")
self.system = CourseRegistrationSystem()
self.current_user = None
self.show_login()

def set_window_size(self):
screen_width = self.root.winfo_screenwidth()
screen_height = self.root.winfo_screenheight()
width = screen_width // 2
height = screen_height // 2
x = (screen_width - width) // 2
y = (screen_height - height) // 2
self.root.geometry(f"{width}x{height}+{x}+{y}")

def clear(self):
for widget in self.root.winfo_children():
widget.destroy()

def show_login(self):
self.clear()
frame = tk.Frame(self.root)
frame.pack(anchor='w', padx=30, pady=10)
tk.Label(frame, text="Login", font=("Arial", 16)).pack(anchor='w', pady=10)
tk.Label(frame, text="Username").pack(anchor='w')
username_entry = tk.Entry(frame)
username_entry.pack(anchor='w')
tk.Label(frame, text="Password").pack(anchor='w')
password_entry = tk.Entry(frame, show="*")
password_entry.pack(anchor='w')
def login_action():
username = username_entry.get()
password = password_entry.get()
user = self.system.login_user(username, password)
if user:
self.current_user = user
self.show_dashboard()
else:
messagebox.showerror("Login Failed", "Invalid credentials or user not registered.")
tk.Button(frame, text="Login", command=login_action).pack(anchor='w', pady=5)
tk.Button(frame, text="Register", command=self.show_register).pack(anchor='w')

def show_register(self):
self.clear()
frame = tk.Frame(self.root)
frame.pack(anchor='w', padx=30, pady=10)
tk.Label(frame, text="Register", font=("Arial", 16)).pack(anchor='w', pady=10)
tk.Label(frame, text="Username").pack(anchor='w')
username_entry = tk.Entry(frame)
username_entry.pack(anchor='w')
tk.Label(frame, text="Password").pack(anchor='w')
password_entry = tk.Entry(frame, show="*")
password_entry.pack(anchor='w')
tk.Label(frame, text="Email").pack(anchor='w')
email_entry = tk.Entry(frame)
email_entry.pack(anchor='w')
tk.Label(frame, text="Date of Birth (YYYY-MM-DD)").pack(anchor='w')
dob_entry = tk.Entry(frame)
dob_entry.pack(anchor='w')
tk.Label(frame, text="Select Courses").pack(anchor='w')
course_vars = []
for course in self.system.courses:
var = tk.IntVar()
cb = tk.Checkbutton(frame, text=course.name, variable=var)
cb.pack(anchor='w')
course_vars.append((course.name, var))
def register_action():
username = username_entry.get()
password = password_entry.get()
email = email_entry.get()
dob = dob_entry.get()
selected_courses = [name for name, var in course_vars if var.get()]
if not (username and password and email and dob and selected_courses):
messagebox.showerror("Error", "All fields are required and at least one course must be selected.")
return
if self.system.register_user(username, password, email, dob, selected_courses):
messagebox.showinfo("Success", "Registration successful! Please login.")
self.show_login()
else:
messagebox.showerror("Error", "Registration failed. Username may already exist or user limit reached.")
tk.Button(frame, text="Register", command=register_action).pack(anchor='w', pady=5)
tk.Button(frame, text="Back to Login", command=self.show_login).pack(anchor='w')
def show_dashboard(self):
self.clear()
frame = tk.Frame(self.root)
frame.pack(anchor='w', padx=30, pady=10)
tk.Label(frame, text=f"Welcome, {self.current_user.username}", font=("Arial", 16)).pack(anchor='w',
pady=10)
tk.Label(frame, text="Registered Courses:").pack(anchor='w')
for course in self.current_user.courses:
tk.Label(frame, text=course.name).pack(anchor='w')
available_courses = [c for c in self.system.courses if c not in self.current_user.courses]
if available_courses:
tk.Label(frame, text="Add More Courses:").pack(anchor='w', pady=5)
course_vars = []
for course in available_courses:
var = tk.IntVar()
cb = tk.Checkbutton(frame, text=course.name, variable=var)
cb.pack(anchor='w')
course_vars.append((course.name, var))
def add_courses_action():
added = False
for name, var in course_vars:
if var.get():
if self.system.add_course_to_user(self.current_user, name):
added = True
if added:
messagebox.showinfo("Success", "Courses added!")
self.show_dashboard()
else:
messagebox.showwarning("No Selection", "No new courses selected.")
tk.Button(frame, text="Add Selected Courses", command=add_courses_action).pack(anchor='w', pady=5)
else:
tk.Label(frame, text="You are registered for all courses.").pack(anchor='w', pady=5)
tk.Button(frame, text="Logout", command=self.show_login).pack(anchor='w', pady=10)

def main():
root = tk.Tk()
App(root)
root.mainloop()

if __name__ == "__main__":
main()
Registration form:

Login page:
Student Dashboard:
Instructor login Page:
Instructor Dashboard:
RESULT:

Thus we implemented the course registration system


Ex. No : 6 Test the software system for all the scenarios identified

Aim:

To prepare Software Requirement Specification for the course registration system.

Procedure:

Begin by identifying the core components of the course registration system that can be tested in isolation.
These typically include:
Course Management: Adding, updating, and deleting courses.
Student Registration: Registering new students, updating student information.
Enrollment: Enrolling students in courses, checking prerequisites, handling course capacity.
Scheduling: Assigning courses to time slots, avoiding conflicts.
Notifications: Sending confirmation emails or alerts.

2. Choose a Testing Framework


For Python, the built-in unittest framework is commonly used for unit testing. It provides a test runner,
assertion methods, and test discovery. Alternatively, pytest is a popular third-party testing framework that
offers additional features like fixtures and parameterized testing.

3. Write Test Cases


Develop test cases that cover various scenarios, including:
Positive Tests: Valid inputs that should succeed.
Negative Tests: Invalid inputs that should fail.
Boundary Tests: Edge cases, such as maximum course capacity.
Exception Tests: Handling of unexpected situations, like database errors.
For instance, testing the add_course() method might include:
Adding a course with valid details.
Attempting to add a course with missing required fields.
Adding a course with a name that already exists.

4. Use Mocking for Dependencies


Utilize mocking frameworks to simulate external dependencies, such as databases or external services, ensuring
that tests focus solely on the unit under test.
Python: unittest.mock is a built-in library for mocking in Python applications.Medium
For example, in a Python application, you can use unittest.mock.patch to mock external services or
components.

5. Run Tests and Analyze Results


Execute the test cases using your chosen framework and analyze the results:
Pass: The unit behaves as expected.
Fail: The unit does not behave as expected; investigate and fix the issue.
Skipped: The test was skipped, often due to configuration or setup issues.
Most frameworks provide detailed reports indicating which tests passed or failed, along with stack traces for
failures.
6. Maintain and Update Tests

As the course registration system evolves, continuously update and maintain your unit tests to reflect changes
in

business logic or requirements.


Refactor Tests: Keep tests clean and readable.
Add New Tests: Incorporate tests for new features or changes.
Remove Obsolete Tests: Eliminate tests for deprecated or removed functionality.
Sample test cases for testing the course registration system:
Test specification for course registration system:
Result:

Thus we done testing of course registration system for all identified scenario successfully.
Ex. No : 7 Document the Software Requirements Specification (SRS) for the Exam registration system.

Aim:

Software Requirements Specification (SRS) for Exam Registration System

1. Introduction
The Exam Registration System is designed to facilitate the registration process for candidates wishing to enroll in
various exams. The system provides a user-friendly interface for both new and existing users to register or log in,
manage their profiles, and enroll in exams.

2. Purpose
The purpose of this document is to outline the functional and non-functional requirements of the Exam Registration
System, ensuring that all stakeholders have a clear understanding of the system's capabilities and constraints.

3. Scope
The system will allow users to:
- Register as new candidates.
- Log in to their existing accounts.
- View available exams.
- Register for selected exams.
- Manage their user profiles.

4. Functional Requirements
4.1 User Registration
- The system shall allow new users to create an account by providing a username and password.
- The system shall validate the uniqueness of the username during registration.

4.2 User Login


- The system shall allow users to log in using their username and password.
- The system shall provide feedback for incorrect login attempts.

4.3 Exam Management


- The system shall display a list of available exams to the user.
- The system shall allow users to register for selected exams.

4.4 User Profile Management


- The system shall allow users to view and update their profile information.

5. Non-Functional Requirements
5.1 Performance
- The system shall handle up to 1000 concurrent users without performance degradation.
5.2 Security
- The system shall securely store user passwords using hashing techniques.
- The system shall implement measures to prevent unauthorized access.

5.3 Usability
- The user interface shall be intuitive and easy to navigate for users of all technical levels.

5.4 Reliability
- The system shall be available 99.9% of the time, excluding scheduled maintenance.

6. Assumptions and Dependencies


- The system will be developed using Python.
- The system will require a database for storing user and exam information.

7. Conclusion
This Software Requirements Specification provides a comprehensive overview of the requirements for the Exam
Registration System. It serves as a foundation for the design and development phases of the project, ensuring that
all functional and non-functional requirements are met.

Result:

Thus we prepared the SRS document for the exam registration successfully.
Ex. No : 8 Identify use cases and develop the Use Case model for Exam
registration system

AIM:
To Identify use cases and develop the Use Case model for the Exam registration system

Procedure:

Use Case Model for Exam Registration System

Actors
1. Candidate: A user who can register for exams and log in to the system.
2. System: The exam registration system that handles user interactions.

Use Cases
1. User Registration
- Actor: Candidate
- Description: A new candidate can register by providing a username and password.
- Preconditions: The candidate must not already have an account.
- Postconditions: The candidate's information is stored in the system.

2. User Login
- Actor: Candidate
- Description: An existing candidate can log in using their username and password.
- Preconditions: The candidate must have an existing account.
- Postconditions: The candidate gains access to the system.

3. View Available Exams


- Actor: Candidate
- Description: A logged-in candidate can view a list of available exams.
- Preconditions: The candidate must be logged in.
- Postconditions: The candidate sees a list of exams.

4. Register for Exam


- Actor: Candidate
- Description: A logged-in candidate can register for a selected exam.
- Preconditions: The candidate must be logged in and the exam must be available.
- Postconditions: The candidate is registered for the exam.

5. Logout
- Actor: Candidate
- Description: A logged-in candidate can log out of the system.
- Preconditions: The candidate must be logged in.
- Postconditions: The candidate is logged out and returns to the login screen.
YOU HAVE TO DRAW THE UML USE CASE DIAGRAM USING STAR UML AND ATTACH HERE

Result:

Thus Identifed use cases and develop the Use Case model for the course registration system successfully.
Ex. No : 9 Identify the conceptual classes and develop a Domain Model and also derive a Class Diagram from
that.

AIM:
Identify the conceptual classes and develop a Domain Model and also derive a Class Diagram from that for the
course registration system

Procedure:

Conceptual Classes
In the context of an Exam Registration System, the primary conceptual classes are:
Student
Attributes: studentID, firstName, lastName, email, phoneNumber, dateOfBirth
Responsibilities: Registers for exams, views results, updates personal information.
Exam
Attributes: examID, subject, date, duration, maxCapacity, location
Responsibilities: Stores exam details, manages registrations, tracks attendance.
Registration
Attributes: registrationID, registrationDate, status (e.g., Pending, Confirmed, Canceled)
Responsibilities: Links students to exams, manages registration status.
Administrator
Attributes: adminID, username, password, role
Responsibilities: Manages exam schedules, oversees registrations, generates reports.
Payment
Attributes: paymentID, amount, paymentDate, paymentMethod, status (e.g., Pending, Completed)
Responsibilities: Processes and tracks payment transactions for exam registrations.
Result
Attributes: resultID, marksObtained, grade, examDate
Responsibilities: Stores and retrieves exam results for students.
Schedule
Attributes: scheduleID, examID, roomNumber, startTime, endTime
Responsibilities: Manages the scheduling of exams in specific rooms at designated times.

YOU HAVE TO DRAW THE CLASS DIAGRAM USING STAR UML AND ATTACH HERE

Result:

Thus we drawn the class diagram using star uml successfully.


Ex. No : 10 Draw the uml Squence and collaboration diagram for the Exam registration system

AIM:
Using the identified scenarios, find the interaction between objects and represent them using UML Sequence and
Collaboration Diagrams for the course registration system

PROCEDURE:

PROCEDURE:
To create UML Sequence and Collaboration Diagrams for a Exam Registration System, we will:
1. Select key scenarios.
2. Identify the objects involved.
3. Model their interactions over time (Sequence Diagram) and structurally (Collaboration Diagram).
Selected Scenarios
1. Student Registers for a Course
Steps involved:
1. Student logs in.
2. Views Exam catalog.
3. Selects an Exam.
4. System checks prerequisites and seat availability.
5. System registers the student and confirms registration.

UML Sequence Diagram


Objects:
• :Student
• :Exam Catalog
• :Exam
• :RegistrationService
• :Database

YOU HAVE TO DRAW THE SEQUENCE DIAGRAM USING STAR UML AND ATTACH
COLABRATION DIAGRAM

YOU HAVE TO DRAW THE COLABRATION DIAGRAM USING STAR UML AND ATTACH

RESULT:
Thus find out the interaction between the objects and drawn the uml sequence diagram and
collaboration diagram.
Ex. No : 11 Draw relevant State Chart and Activity Diagrams for the same system.

AIM:

To Create State Chart and Activity Diagrams for a Course Registration System based on relevant system states and actions.

PROCEDURE:
To create State Chart and Activity Diagrams for a Course Registration System based on relevant system states and
actions.
Procedure:
Step 1: Identify Relevant States (for a Student)
In the context of Course Registration, a Student goes through the following states:
States:
1. Start
2. Logged In
3. Viewing Exam
4. Selecting Exam
5. Checking Prerequisites
6. Exam Registered

YOU HAVE TO DRAW THE STATE CHART DIAGRAM USING STAR UML AND ATTACH HERE

ACTIVITY DIAGRAM

Step 1: Identify Activities


The key activities a student performs during course registration:
Main Activities:
1. Start
2. Login
3. View Exam Catalog
4. Select Course
5. Check Prerequisites
6. Check Exam Capacity
7. Register for Exam
8. Show Confirmation
9. Logout / Exit

YOU HAVE TO DRAW THE Activity DIAGRAM USING STAR UML AND ATTACH HERE
RESULT:
Thus identified the system states and action, drawn state chart diagram and activity diagram
Exp. No : 12 Implement the Exam registration system as per the detailed design

AIM:
To Implement the Course registration system as per the detailed design

PROCEDURE:

# main.py

from ui.interface import UserInterface

def main():
ui = UserInterface()
ui.start()

if __name__ == "__main__":
main()

Exam Registration Page:


Login Page:
Ex. No : 13 Test the software system for all the scenarios identified

Aim:

To prepare Software Requirement Specification for the Exam registration system.

Procedure:

Begin by identifying the core components of the exam registration system that can be tested in isolation. These
typically include:
Exam Management: Adding, updating, and deleting exams.
Student Registration: Registering new students, updating student information.
Scheduling: Assigning exams to time slots, avoiding conflicts.
Notifications: Sending confirmation emails or alerts.

2. Choose a Testing Framework


For Python, the built-in unittest framework is commonly used for unit testing. It provides a test runner,
assertion methods, and test discovery. Alternatively, pytest is a popular third-party testing framework that
offers additional features like fixtures and parameterized testing.

3. Write Test Cases


Develop test cases that cover various scenarios, including:
Positive Tests: Valid inputs that should succeed.
Negative Tests: Invalid inputs that should fail.
Boundary Tests: Edge cases, such as maximum course capacity.
Exception Tests: Handling of unexpected situations, like database errors.

4. Use Mocking for Dependencies


Utilize mocking frameworks to simulate external dependencies, such as databases or external services, ensuring
that tests focus solely on the unit under test.
Python: unittest.mock is a built-in library for mocking in Python applications.Medium
For example, in a Python application, you can use unittest.mock.patch to mock external services or
components.

5. Run Tests and Analyze Results


Execute the test cases using your chosen framework and analyze the results:
Pass: The unit behaves as expected.
Fail: The unit does not behave as expected; investigate and fix the issue.
Skipped: The test was skipped, often due to configuration or setup issues.
Most frameworks provide detailed reports indicating which tests passed or failed, along with stack traces for
failures.
6. Maintain and Update Tests

As the course registration system evolves, continuously update and maintain your unit tests to reflect changes
in

business logic or requirements.


Refactor Tests: Keep tests clean and readable.
Add New Tests: Incorporate tests for new features or changes.
Remove Obsolete Tests: Eliminate tests for deprecated or removed functionality.
Sample test cases:

Test Name Prerequisite Test Case Description


test_exam_creation None Verify Exam object is created with correct attributes
test_exam_duration Exam object created Change exam duration and verify the update
test_exam_name_change Exam object created Change exam name and verify the update
test_exam_date_change Exam object created Change exam date and verify the update

Test Data Expected Result Actual Result


name="Math 101", date="2023-12-01", Exam attributes match the input
duration=120 values same sa expected result
duration=150 Exam duration is updated to 150 same sa expected result
Exam name is updated to "Physics
name="Physics 101" 101" same sa expected result
Exam date is updated to "2023-12-
date="2023-12-15" 15" same sa expected result

Result: Thus we done the unit testing of exam registration successfully.


Content beyond Syllabus

Ex. No : 14 Set up a CI/CD system using Jenkins

Aim:

To set up a CI/CD system using Jenkins

Procedure:

CI/CD Workflow with Jenkins


Developer pushes code to a GitHub repository.
Jenkins detects the change (via webhook or polling).
Pipeline is triggered to:
Pull the latest code.
Build the application.
Run tests.
Deploy to staging or production.

Requirements
Jenkins installed and running.
GitHub repository with code and Jenkinsfile.
Jenkins Git plugin installed.
Optional: Webhook configured in GitHub for automatic triggering.

Sample Jenkins Pipeline Script (Jenkinsfile)


pipeline {
agent any

environment {
// Define environment variables if needed
APP_NAME = 'MyApp'
}

stages {
stage('Clone Repository') {
steps {
git 'https://github.com/your-username/your-repo.git'
}
}

stage('Build') {
steps {
echo "Building the application..."
// Example: sh 'npm install' or 'mvn clean install'
}
}

stage('Test') {
steps {
echo "Running tests..."
// Example: sh 'npm test' or 'mvn test'
}
}

stage('Deploy') {
steps {
echo "Deploying the application..."
// Example: sh './deploy.sh'
}
}
}

post {
success {
echo 'Pipeline completed successfully!'
}
failure {
echo 'Pipeline failed.'
}
}
}
Content beyond Syllabus

Ex. No : 15 Configuration Management with Git and GitHub

Aim:

To set up a CI/CD system using Jenkins

Procedure:

Configuration Management with Git and GitHub – A Brief Introduction


Configuration management is the practice of systematically handling changes to ensure consistency and
reliability in software systems. When combined with tools like Git and GitHub, it becomes a powerful
approach for managing code, configurations, and collaboration.

What is Git?
Git is a distributed version control system that allows developers to:
Track changes in source code over time.
Collaborate with others without overwriting each other's work.
Revert to previous versions if needed.

What is GitHub?
GitHub is a cloud-based platform built around Git. It provides:
Remote repositories for storing and sharing code.
Collaboration tools like pull requests, issues, and discussions.
Integration with CI/CD pipelines and project management tools.

How Git and GitHub Support Configuration Management


Version Control: Every change to configuration files (like .env, .yaml, .json) is tracked.
Collaboration: Teams can work on different branches and merge changes through pull requests.
Audit Trails: Git logs provide a history of who changed what and why.
Rollback Capability: Easily revert to a previous stable configuration if something breaks.
Automation: GitHub Actions can automate testing and deployment of configuration changes.

Git Configuration Management


1. Global Configuration
Set user-specific configurations that apply across all repositories:

git config --global user.name "Your Name"


git config --global user.email "[email protected]"

2. Repository-Specific Configuration
Override global settings for a specific repository:

git config user.name "Repo-Specific Name"

3. Modular Configuration Files

gitconfig.d/
user-config
repo-config
global-config

This approach simplifies management and facilitates reuse across different projects.

GitHub Configuration Management


1. Branch Protection Rules
Enforce rules to protect critical branches:
Prevent direct pushes to main or master.
Require pull requests for all changes.
Enable status checks before merging.

CODEOWNERS File
Define individuals or teams responsible for specific parts of the codebase

# CODEOWNERS
/docs/ @documentation-team
/src/ @frontend-team

his ensures that the right people review changes to relevant parts of the codebase.
3. Secrets Management
Never commit sensitive information into your code
Use environment variables or GitHub Secrets for credentials.
Utilize tools like Vault or AWS Secrets Manager.
This practice helps in safeguarding sensitive data.

GitOps: Git as the Source of Truth


GitOps is an operational model that uses Git repositories as the source of truth for declarative infrastructure and
applications.

Key Practices:
Declarative Configuration: Define the desired state of infrastructure in Git.
Automation: Use CI/CD pipelines to automatically apply changes.
Monitoring: Continuously monitor and reconcile the desired state with the actual state.
This approach ensures consistency and traceability in configuration management.
Best Practices
Use .gitignore to exclude sensitive or environment-specific files.
Store default or template configuration files (e.g., config.example.json).
Use branches and pull requests for reviewing changes.
Tag releases to mark stable configurations.

You might also like