Oop MP
Oop MP
A
MICRO PROJECT
REPORT ON
“AGE CALCULATOR”
Subject Name: GUI Application Development using VB.Net
Subject Code: 22034
SUBMITTED BY
GUIDED BY
Mr. Haseebuddin Khan
CERTIFICATE
This is to certify that
Mr.
VISION
MISSION
• To create and sustain an academic environment Conducive to the
highest level of research and teaching.
• To provide state-of-the-art laboratories which will be up to date
with the new developments in the area of computer engineering.
• To organize competitive event, industry interactions and global
collaborations in view of providing a nurturing environment for
students to prepare for a successful career and the ability to tackle
lifelong challenges in global industrial needs.
• To educate students to be socially and ethically responsible citizens
I view of national and global development.
INDEX
Sr. No Topic
Page
No
1 INTRODUCTION 1
3 ADVANTAGES 4
4 DISADVANTAGES 5
5 SOURCE CODE 6
6 OUTPUT 7
7 CONCLUSION 8
INTRODUCTION
The Student Grading System is a software application designed to calculate student grades based
on marks obtained in five subjects. This system aims to simplify the process of grading students
and provide accurate results.
Objective:
Scope:
Limitations:
System Overview:
1|Page
SYSTEM REQUIREMENTS
Hardware Requirements:
Software Requirements:
Functional Requirements:
Non-Functional Requirements:
1. User-friendly interface
2. Efficient data storage and retrieval
3. Accurate calculations
4. Robust error handling
This page outlines the necessary hardware, software, and functional requirements for the Student
Grading System.
2|Page
SYSTEM DESIGN
The Student Grading System will be designed using object-oriented programming (OOP)
concepts in C++.
Class Diagram:
class Student {
private:
string name;
int rollNumber;
int marks[5];
float percentage;
char grade;
public:
void input();
void calculatePercentage();
void assignGrade();
void display();
void writeFile();
};
System Components:
3|Page
FUNCTION DESCRIPTION
iostream: Includes input/output streams for reading and writing data to the console.
string: Includes the string class for handling text strings.
Class Definition:
Student: Represents a student with the following private members:
name: Stores the student's name as a string.
marks: An array of 5 integers to store the marks for different subjects.
totalMarks: Stores the total marks obtained by the student.
percentage: Stores the calculated percentage of the student.
grade: Stores the assigned grade based on the percentage.
Public Methods:
Student(const std::string& name, const int marks[]): Constructor that initializes the name
and marks members, calculates totalMarks, percentage, and grade.
calculatePercentageAndGrade(): Calculates the percentage based on totalMarks and
assigns the corresponding grade using a grading scale.
display() const: Displays the student's name, total marks, percentage, and grade to the
console.
Main Function:
Creates an array of 5 Student objects with sample data for their names and marks.
Prints a header "Student Records".
Iterates over the array of students, calling the display() method for each student to print
their details.
Explanation:
The code defines a Student class to represent individual students with their names,
marks, total marks, percentage, and grade.
The constructor takes the student's name and an array of 5 marks as input.
It initializes the name and marks members, calculates the totalMarks by summing the
marks, and then calls calculatePercentageAndGrade() to determine the percentage and
grade.
The calculatePercentageAndGrade() method calculates the percentage based on the total
marks (assuming each subject is out of 100) and assigns the appropriate grade according
to a grading scale.
The display() method prints the student's details, including name, total marks,
percentage, and grade.
In the main function, an array of 5 Student objects is created with sample data.
The display() method is called for each student to print their information to the console.
SOURCE CODE
4|Page
#include <iostream>
#include <string>
class Student {
private:
std::string name;
int marks[5];
float totalMarks;
float percentage;
char grade; // Use char for grade for better readability and efficiency
public:
void input() {
std::cout << "Enter student name: ";
std::getline(std::cin, name); // Use std::getline to read full names with spaces
totalMarks = 0;
void calculatePercentageAndGrade() {
percentage = (totalMarks / (500.0f)) * 100; // Use 500.0f for floating-point division
if (percentage >= 90) grade = 'A';
else if (percentage >= 80) grade = 'B';
else if (percentage >= 70) grade = 'C';
else if (percentage >= 60) grade = 'D';
else if (percentage >= 50) grade = 'E';
else grade = 'F';
}
int main() {
const int studentCount = 5;
5|Page
Student students[studentCount];
return 0;
}
6|Page
OUTPUT
7|Page
CONCLUSION
This Student Grading System effectively manages student data, calculates performance metrics,
and persists the records in a text file. The code demonstrates fundamental object-oriented
programming concepts such as encapsulation, and it includes input validation to ensure data
integrity. Future improvements could include handling more dynamic input (like variable
numbers of subjects), enhancing user experience with GUI, or implementing more detailed
reporting features.
The Student Grading System has been successfully implemented using C++ programming
language. This system:
Objectives Achieved:
Future Enhancements:
8|Page
REFERENCES
C++ Documentation:
The official C++ website: cplusplus.com and cppreference.com provide extensive
documentation and examples of C++ features.
Online Coding Platforms:
Websites like GeeksforGeeks and LeetCode offer tutorials and problems that help
improve programming skills in C++.
Programming Communities:
Online forums like Stack Overflow where you can ask specific questions and get
answers from experienced programmers.
9|Page