0% found this document useful (0 votes)
16 views6 pages

CA Swe 2025

The document outlines a group project to implement an enhanced Student Management System using Code::Blocks, detailing the division of work between two students, environment setup, and integration of functionalities. It specifies tasks such as inputting student data, performing searches and sorting, adding bonuses, and displaying rankings. The final submission requires packaging the code and output into a ZIP file, with evaluation criteria focusing on correctness, collaboration, code quality, and output accuracy.
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)
16 views6 pages

CA Swe 2025

The document outlines a group project to implement an enhanced Student Management System using Code::Blocks, detailing the division of work between two students, environment setup, and integration of functionalities. It specifies tasks such as inputting student data, performing searches and sorting, adding bonuses, and displaying rankings. The final submission requires packaging the code and output into a ZIP file, with evaluation criteria focusing on correctness, collaboration, code quality, and output accuracy.
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/ 6

TP Practical

Group Work Instructions


Objective: Implement the enhanced Student Management System using Code::Blocks and complete
the functionalities specified in the problem statement.

Work Plan:
1. Group Formation:
• Form groups of 2 students.
• Assign roles:
• Student 1: Focuses on implementing input, output, and bonus functionalities.
• Student 2: Implements search (sequential and binary), sorting, and ranking.
2. Setup Environment:
• Ensure Code::Blocks is installed and functional.
• Create a new project named CA-Practise.
3. Division of Work:
• Both students will work on separate files/modules:
• student_data.cpp for input, output, and bonus functionalities.
• student_operations.cpp for search, sorting, and ranking functionalities.
4. Integration:
• After completing individual parts, merge the code into a single file named
student_management_system.cpp.
5. Testing:
• Test the program with the following scenarios:
• Input at least 5 students' names and grades.
• Perform sequential and binary search.
• Add bonus for one student and for the entire class.
• Display the minimum and maximum grades.
• Show the sorted list with rankings and mentions.
6. Output:
• Save the output of the program (console results) in a text file named output.txt.

Final Submission:
1. Packaging Results:
• Include the following files in a single ZIP file:
• student_management_system.cpp (final code)
• output.txt (program output)
• Any other associated files (e.g., project files if necessary).
2. File Naming:
• Name the ZIP file as:
CA-Practise-2024-2025-IIG-SWE2B.zip

3. Submission Deadline:
• Duration: 3 hours.
• Submit the ZIP file to the designated folder or via email as instructed by your supervisor.

Evaluation Criteria:
1. Correctness:
• Proper implementation of all functionalities.
2. Team Collaboration:
• Clear division of roles and successful integration.
3. Code Quality:
• Use of meaningful variable names, comments, and structured code.
4. Output Accuracy:
• Matches expected results.
Good luck!

Student Management System Using C++


The student management system is now extended to include the following functionalities:

Part A: Using Simple Arrays


Updated Tasks:
1. Input Student Data:
• Prompt the user to input the total number of students.
• For each student, input their name and grade.
2. Sequential Search:
• Find a student by name and display their grade.
3. Binary Search:
• Sort student names and grades in ascending order by name and implement binary search.
4. Find Minimum and Maximum Grades:
• Identify the student(s) with the lowest grade and the highest grade.
5. Add Bonus to a Student:
• Allow the user to select a student by name and add a bonus to their grade.
6. Add Bonus to All Students:
• Add a specified bonus to every student's grade.
7. Display Rankings and Mentions:
• Sort students by grade in descending order.
• Assign mentions based on grades:
• >= 90: "Excellent"
• >= 75: "Very Good"
• >= 50: "Pass"
• < 50: "Fail"

Part B: Using Structures


Updated Tasks:
1. Define a struct for Students:

• Create a Student structure with the following fields:


• name (string)
• grade (float)
2. Input Data:
• Use an array of Student structures to input details.
3. Find Minimum and Maximum Grades:
• Identify the student(s) with the lowest and highest grades.
4. Add Bonus to a Student and All Students:
• Add bonus points to a specific student or all students.
5. Display Rankings and Mentions:
• Sort students by grades in descending order and assign mentions.

C++ Implementation Guide


Part A: Using Simple Arrays
#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

void inputData(string names[], float grades[], int size);


void displayData(string names[], float grades[], int size);
int sequentialSearch(string names[], int size, string target);
void findMinAndMax(string names[], float grades[], int size);
void addBonusToStudent(string names[], float grades[], int size, string target,
float bonus);
void addBonusToAll(string names[], float grades[], int size, float bonus);
void sortAndRank(string names[], float grades[], int size);

int main() {
const int MAX = 100;
string names[MAX];
float grades[MAX];
int size;

cout << "Enter the number of students: ";


cin >> size;

inputData(names, grades, size);

string target;
cout << "Enter the name of a student to find their grade: ";
cin >> target;
int index = sequentialSearch(names, size, target);
if (index != -1)
cout << target << "'s grade: " << grades[index] << endl;
else
cout << "Student not found." << endl;

findMinAndMax(names, grades, size);

cout << "Enter the name of a student to add a bonus: ";


cin >> target;
float bonus;
cout << "Enter the bonus: ";
cin >> bonus;
addBonusToStudent(names, grades, size, target, bonus);

cout << "Enter the bonus for the whole class: ";
cin >> bonus;
addBonusToAll(names, grades, size, bonus);

sortAndRank(names, grades, size);

return 0;
}

// Implement functions here...

Part B: Using Structures


#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

struct Student {
string name;
float grade;
};

void inputData(Student students[], int size);


void displayData(Student students[], int size);
int sequentialSearch(Student students[], int size, string target);
void findMinAndMax(Student students[], int size);
void addBonusToStudent(Student students[], int size, string target, float bonus);
void addBonusToAll(Student students[], int size, float bonus);
void sortAndRank(Student students[], int size);

int main() {
const int MAX = 100;
Student students[MAX];
int size;

cout << "Enter the number of students: ";


cin >> size;

inputData(students, size);

string target;
cout << "Enter the name of a student to find their grade: ";
cin >> target;
int index = sequentialSearch(students, size, target);
if (index != -1)
cout << target << "'s grade: " << students[index].grade << endl;
else
cout << "Student not found." << endl;

findMinAndMax(students, size);

cout << "Enter the name of a student to add a bonus: ";


cin >> target;
float bonus;
cout << "Enter the bonus: ";
cin >> bonus;
addBonusToStudent(students, size, target, bonus);

cout << "Enter the bonus for the whole class: ";
cin >> bonus;
addBonusToAll(students, size, bonus);

sortAndRank(students, size);

return 0;
}

// Implement functions here...

New Functions to Implement


Finding Minimum and Maximum Grades
• Loop through the grades to find the lowest and highest grades.
• Print the names of the students with these grades.
Adding Bonus
• To a specific student: Search by name and add bonus points.
• To the whole class: Loop through all grades and add bonus points.

Sorting and Ranking


• Sort students by grades in descending order.
• Assign mentions based on the grading scale:
• >= 90: "Excellent"
• >= 75: "Very Good"
• >= 50: "Pass"
• < 50: "Fail"

You might also like