0% found this document useful (0 votes)
25 views43 pages

Summer Training on Number Game & Grades

Uploaded by

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

Summer Training on Number Game & Grades

Uploaded by

Blakk Boy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

SUMMER TRAINING REPORT

ON
[RANDOM NUMBER GAME ]
[Name of the Institute …………...]
B. TECH(CSE)- ……… SEMESTER
SESSION: 2025-26

UNDER THE GUIDANCE OF: SUBMITTED BY:


Mr. ……………………. …………..
Assistant Professor ENROLLMENT NO: ………..
SEMESTER: ………..

Department of Computer Science & Engineering


Greater Noida Institute of Technology
Plot No. 6B & 6C, Knowledge Park - II, Greater Noida, Uttar
Pradesh - 201310
CERTIFICATE OF COMPLETION
DECLARATION

I, ................... a student of BTECH CSE at JIMS ENGINEERING


MANAGEMENT TECHNICAL CAMPUS, hereby declare that this
project report titled “NUMBER GAME AND STUDENT GRADE
CALCULATOR ” is an original work carried out by me under the
guidance of MR. ……………( ASSISTANT PROFESSOR) in
period from JULY O5, 2025 to AUGUST 05, 2025 by me.
This project has been developed for educational purposes as part of the
course requirements for JAVA PROGRAMMING. The code, design, and
ideas presented in this project are my own, and any external sources or
references have been duly acknowledged.
I affirm that this report has not been submitted to any other institution or
authority for any academic or professional qualification.

Name: ……………

Enroll. No.: …………………

Date:
(Signature of the Student)

Tusha 045255027 3|Pag


r 22 e
BONAFIDE CERTIFICATE

This is to certify that as per best of my belief the project entitled


“NUMBER GAME AND STUDENT GRADE CALCULATOR” is
the bonafide research work carried out by [Name of the Student]
student of [Link](Computer Science), [College Name], Greater
Noida, in partial fulfillment of the requirements for the Summer
Training Report for the Degree of Bachelor of Technology.
He has worked under my guidance.
I wish her a success in all her future career endeavors.

Industrial Mentor

Name: Mr. ...................


Designation: Team Head

Signature with Date


Faculty Guide

Name: Mr. …………………..


Designation: Assistant Professor
Signature with Date

4|Page
ACKNOWLEDGEMENT

I offer my sincere thanks and humble regards to [COLLGE


NAME], Greater Noida for imparting us very valuable professional
training in BTECH (Computer Science).
I pay my gratitude and sincere regards to Mr. ................... , my
project Guide for giving me the cream of his
knowledge.

I am thankful to him as he has been a constant source of advice,


motivation and inspiration. I am also thankful to him for giving his
suggestions and encouragement throughout the project work.
I also would like to thank Mr. ..................., my mentor, who mentored
me, guided me and challenged me at every stage of my project. Last
but not the least, I would like to thank our founders for considering me
as a part of their organization and providing me the chance to work in
the Project it helps me to learn broader and enhance my skills.
I take the opportunity to express my gratitude and thanks to our
computer Lab staff and library staff for providing me opportunity to
utilize their resources for the completion of the project.
I am also thankful to my family and friends for constantly motivating
me to complete the project and providing me an environment, which
enhanced my knowledge.

(Signature of the Student)

Name: ...................

Enroll. No....................

Course: [Link] (CSE) (7th Sem)

Date:

5|Page
ABSTRACT
CODSOFT through their monthly hiring of fresher college students
for internship, provides a unique learning experience centered around
practical tasks showcasing JAVA PROGRAMMING. I was allotted 3
tasks out of which two were the minor project the Gist of all the 2
projects below:-
TASK 1
1. Generate a random number within a specified range, such as 1 to 100.
2. Prompt the user to enter their guess for the generated number.
3. Compare the user's guess with the generated number and provide
feedback on whether the guess is correct, too high, or too low.
4. Repeat steps 2 and 3 until the user guesses the
correct number. You can incorporate additional
details as follows:
5. Limit the number of attempts the user has to guess the number.
6. Add the option for multiple rounds, allowing the user to play again.
7. Display the user's score, which can be based on the number of
attempts taken or rounds won.

TASK 2
Input: Take marks obtained (out of 100) in each
subject. Calculate Total Marks: Sum up the
marks obtained in all subjects.

Calculate Average Percentage: Divide the total marks by the total


number of subjects to get the average percentage.
Grade Calculation: Assign grades based on the average percentage
achieved.
Display Results: Show the total marks, average percentage, and the
corresponding grade to the user.

6|Page
COMPANY PROFILE
Introduction
CodSoft is a fast-growing IT services and software development
company that focuses on delivering innovative, reliable, and industry-
driven technology solutions. The company operates as a training and
development platform that not only builds software solutions but also
provides internships, workshops, and practical learning opportunities to
students and young professionals in the field of Information Technology.
CodSoft has gained recognition for creating an environment where
learners and developers can gain real-world experience in coding,
software development, and project implementation.
Vision and Mission
 Vision: To bridge the gap between academic knowledge and industry
requirements by equipping students with practical technical skills.
 Mission: To provide affordable, hands-on learning and project-based
experience in various domains such as software development, web
development, app development, artificial intelligence, machine
learning, and cloud technologies.
 CodSoft emphasizes a culture of innovation, learning, and
collaboration. It encourages interns and employees to work on real-life
projects, develop teamwork skills, and practice problem-solving with
modern technologies. By providing mentors, project guidance, and
industry-relevant tasks, CodSoft helps participants gain confidence
and build a strong professional foundation.
 The company is highly regarded for its internship programs, which are
designed to give students an opportunity to work on live projects,
enhance their coding proficiency, and understand software
development practices. Many students and freshers benefit from
CodSoft’s structured approach to skill development, making them job-
ready for careers in IT.

7|Page
Table of Contents
Completion Certificate.................................................................................................2
Declaration...................................................................................................................3
Bonafide Certificate......................................................................................................4
Acknowledgement...................................................................................... 5
Abstract..................................................................................................................................6
Company Profile...........................................................................................................7

Chapter 1: Introduction.....................................................................................9
1.1 Background…..........................................................................................................9
1.2 Problem Statement...................................................................................................10
1.3 Objective..................................................................................................................11
1.4Scope................................................................................................................................12

Chapter 2: Methodology..................................................................................13
2.1 Internship Workflow............................................................................................13-14
2.2 Learning Path & Activities...................................................................................14-15
2.3 Tools & Resources Used......................................................................................15-16

Chapter 3: System Design & Architecture....................................................17-18


3.1 Functional Requirements.....................................................................................19
3.2 Non-Functional Requirements.............................................................................20

Chapter 4: Implementation.............................................................................21
4.1 Number Game..................................................................................................21-23
4.2 Student Grade Calculator...................................................................24-25
4.3 Challenges and Learnings....................................................................................26-27

Chapter 5: Results & Analysis........................................................................28


5.1Number Game................................................................................. 29-30
5.2Student Grade Calculator.....................................................................31-32

Chapter 6: Conclusion.....................................................................................33-34
References.........................................................................................................35

8|Page
CHAPTER 1: INTRODUCTION

1.1 Background
The internship at CodSoft was designed to provide students with practical
exposure to the IT industry and enhance their technical skills through real-
world projects. CodSoft is known for its commitment to bridging the gap
between theoretical learning and industrial applications, and its internship
programs are structured to give participants hands-on experience in software
development, problem-solving, and project execution.
As part of the internship, students are assigned tasks and projects in their
respective domains, such as Python programming, Java development,
web development, artificial intelligence, and machine learning. These
tasks are carefully designed to simulate real-time industry challenges,
encouraging interns to apply their classroom knowledge in practical
situations.
The program emphasizes:
 Understanding the fundamentals of software development and
programming.
 Building problem-solving and logical thinking abilities.
 Gaining exposure to project-based learning and teamwork.
 Developing time management, self-discipline, and research skills.
The internship also provides mentorship from experienced professionals who
guide interns in improving their technical proficiency and adapting to
industry-standard practices. It creates a platform for interns to not only
enhance their coding and development skills but also to build confidence for
future job opportunities.
Overall, this internship background reflects CodSoft’s mission to prepare
students for the competitive IT industry by offering them structured training,
guidance, and opportunities for skill enhancement.

9|Page
10 | P a g
e
1.2 Problem Statement
1. Number Game
The traditional number-guessing game is often played for fun but lacks a
structured digital format where users can interact with the system
intelligently. Many beginners in programming struggle to apply logical
thinking, conditional statements, and loops in a practical scenario. Therefore,
there is a need for a simple interactive game where the computer generates a
random number, and the player has to guess it within limited attempts. This
project aims to create a user-friendly Number Game that enhances logical
reasoning and provides practice in programming fundamentals like random
number generation, conditional logic, and iteration.

How can we design and implement a simple interactive number-guessing


game that challenges users to guess a randomly generated number within a
set number of attempts while improving logical thinking and programming
skills?
2. Student Grade Calculator
Evaluating student performance manually can be time-consuming and prone
to human error. With increasing academic workload, there is a need for an
automated system that can calculate grades quickly and accurately based on
marks obtained in different subjects. This project focuses on building a
Student Grade Calculator that takes input of marks, calculates the average
percentage, and assigns the appropriate grade according to predefined
criteria. How can we develop an automated student grade calculator that
computes the average marks and assigns accurate grades efficiently, thereby
reducing manual effort and chances of error?

11 | P a g
e
12 | P a g
e
1.3 Objective
1. Number Game
The main objectives of developing the Number Game project are:
 To design an interactive game that allows users to guess a
randomly generated number within limited attempts.
 To practice and implement fundamental programming concepts such
as loops, conditional statements, and random number generation.
 To enhance problem-solving and logical thinking skills through a
fun and engaging approach.
 To improve user interaction by providing hints (e.g., whether
the guessed number is higher or lower).
 To build a simple, error-free, and user-friendly program
that demonstrates the application of basic programming
logic.
2. Student Grade Calculator
The main objectives of developing the Student Grade Calculator project are:
 To create an automated system that calculates the average
percentage of marks obtained by a student.
 To assign appropriate grades to students based on predefined
grading criteria.
 To reduce human error and save time in evaluating
student performance.
 To strengthen programming skills in handling user input,
performing calculations, and displaying results.
 To design a reliable and easy-to-use program that ensures
accuracy and efficiency in grade calculation.

13 | P a g
e
14 | P a g
e
1.4 Scope
1. Number Game
The scope of the Number Game project lies in its ability to provide a
simple, interactive, and engaging way for users to practice logical reasoning
and basic programming concepts. The game can be expanded to include
multiple difficulty levels, score tracking, leaderboards, and hints to make it
more challenging and fun. In the academic and learning context, the project
serves as a foundation for understanding programming constructs such as
loops, conditionals, and random number generation. It can also be used as a
teaching tool for beginners in programming to strengthen their problem-
solving skills.
2. Student Grade Calculator
The scope of the Student Grade Calculator project is to provide an
automated solution for calculating student grades quickly and accurately.
While the current version calculates average marks and assigns grades, it can
be further extended to handle large datasets of students, integrate with
databases, and generate detailed performance reports. This project is useful
for educational institutions, teachers, and students, as it minimizes errors in
evaluation and saves time. Moreover, it provides a strong base for
developing more advanced systems such as student performance dashboards
and online academic management systems.

15 | P a g
e
16 | P a g
e
CHAPTER 2: METHODOLOGY
2.1 Internship Workflow
The internship at CodSoft followed a structured and systematic flow to
ensure maximum learning and skill development. The program was divided
into different stages that helped in understanding concepts, applying
knowledge, and developing projects effectively. The flow of the internship
can be described as follows:

1. Orientation and Introduction

 Introduction to CodSoft, its vision, and internship guidelines.


 Overview of the projects to be completed during the internship.
 Familiarization with tools, technologies, and programming
environments required.

2. Task Allocation

 Specific projects were assigned, such as Number Game and Student


Grade Calculator.
 Clear instructions and problem statements were provided for each task.
 Deadlines and expectations were communicated to ensure timely
completion.

3. Project Development Phase

 Understanding Requirements: Analyzing the problem statements


and objectives.
 Designing the Logic: Planning algorithms and flowcharts for project
execution.
 Coding and Implementation: Writing code in the selected
programming language (e.g., Python/Java).
 Testing and Debugging: Running the program, identifying errors,
and fixing issues.

4. Mentorship and Feedback

 Regular guidance from mentors to resolve doubts and improve the


quality of work.
 Feedback sessions to refine coding practices, logic, and documentation.

17 | P a g
e
5. Submission of Projects

 Completed projects (Number Game and Student Grade Calculator)


were submitted for review.
 Reports and documentation were prepared to explain the working and
outcomes of each project.

6. Completion and Certification

 Successful evaluation of submitted projects.


 Issuance of internship completion certificate by CodSoft as
recognition of the work done.

2.2 Learning Path & Activities


Learning Path

During the internship at CodSoft, the learning journey was structured in a


progressive manner that focused on both technical and professional growth.
The path can be summarized as follows:

1. Introduction to Internship Goals – Understood the objectives,


expectations, and project details provided by CodSoft.
2. Fundamental Revision – Revised the basics of programming (loops,
conditionals, input/output handling, and functions).
3. Project-Based Learning – Applied programming knowledge in
developing real-world projects such as Number Game and Student
Grade Calculator.
4. Problem-Solving Skills – Improved logical reasoning, debugging,
and error-handling capabilities.
5. Code Optimization – Learned how to write clean, structured, and
efficient code following standard practices.
6. Documentation & Reporting – Gained experience in documenting
project flow, objectives, scope, and outcomes in a professional format.
7. Feedback & Improvement – Incorporated mentor feedback to
enhance the quality of projects and refine technical understanding.

Activities Performed

Throughout the internship, several activities were carried out to ensure


practical learning:

 Attended orientation and introduction sessions to understand


internship structure.

18 | P a g
e
 Analyzed problem statements and designed solutions before coding.
 Developed the Number Game Project using random number logic
and loops.
 Created the Student Grade Calculator Project to calculate averages
and assign grades automatically.
 Performed testing and debugging to remove errors and improve
performance.
 Submitted completed projects for review and received mentor feedback.
 Prepared final internship documentation and reports summarizing
learning outcomes.

2.3 Tools & Resources Used


1. Programming Language

 Python / Java (depending on the chosen language for the internship


tasks).
o Used for implementing project logic such as loops, conditionals,
input/output handling, and random number generation.

2. Development Environment

 IDE/Text Editors:
o Visual Studio Code / PyCharm / Eclipse / IntelliJ (any one used
during the internship).
o Provided features like syntax highlighting, debugging, and auto-
completion to ease development.

3. Libraries and Modules

 Random Module (Python): Used in the Number Game to generate


random numbers.
 Math/Utility Functions: For calculations and validations in the
Student Grade Calculator.

4. Hardware Requirements

 Personal computer or laptop with minimum configuration:


o Processor: Intel i3 or above
o RAM: 4 GB or higher
o Storage: 500 MB free space for code and reports

19 | P a g
e
5. Software Requirements

 Operating System: Windows / Linux / macOS


 Programming Language Setup: Python (≥3.8) or Java (≥8)
 Required IDE/Text Editor installed

6. Documentation Tools

 MS Word / Google Docs: Used for preparing project documentation


and reports.
 MS PowerPoint / Google Slides: For preparing presentations (if
required).

7. Online Resources

 CodSoft-provided project guidelines and instructions.


 Programming tutorials and documentation (e.g., Python official docs,
Java documentation, GeeksforGeeks, W3Schools, etc.) for reference.
 Stack Overflow and GitHub for troubleshooting and sample code
references.

20 | P a g
e
CHAPTER 3: SYSTEM DESIGN & ARCHITECTURE
1. Number Game
Overview:
The number game is an interactive application where users play a fun and
engaging game involving number guessing or calculations.
Architecture:
 Client Interface: A user-friendly graphical user interface (GUI) or
console interface was developed using a programming language like
Python with Tkinter or JavaScript.
 Business Logic Layer: The core game logic processes user inputs,
generates random numbers, evaluates guesses, and provides feedback.
 Data Handling: Temporary variables store user attempts and scores
during gameplay.
 Flow:
1. The user initiates the game.
2. The system generates a random target number.
3. The user inputs guesses.
4. The system validates the input, compares with the target
number, and gives clues or updates attempts.
5. The game ends when the user guesses correctly or runs out of
attempts.
Design Considerations:
 Simple and responsive design.
 Error handling for invalid inputs.
 Modular design separating UI and logic.
2. Student Grade
Calculator Overview:
The student grade calculator automates the process of inputting marks and
calculating final grades based on predefined criteria.
Architecture:
 User Interface: A form-based UI (GUI or web form) for entering
student marks across subjects.

21 | P a g
e
 Calculation Engine: Logic to calculate total marks, percentage, and
corresponding grades according to preset thresholds.
 Data Management: Temporarily holds input data during the
calculation session; can be extended to save data.
 Workflow:
1. User inputs marks for various subjects.
2. System sums the marks.
3. Calculates percentage and determines grade based on grading
criteria.
4. Displays results to the user.
Design Considerations:
 Input validation to ensure marks are valid.
 Clear and concise display of results.
 Extensibility for adding more subjects or changing grading metrics.

22 | P a g
e
3.1 FUNCTIONAL REQUIREMENTS
1. Number Game

The system must be able to:

1. Generate a random number within a specified range (e.g., 1–100).


2. Allow the user to input their guess.
3. Compare the user’s guess with the generated number.
4. Provide hints to the user (e.g., “Too High” or “Too Low”).
5. Limit the number of attempts and end the game when attempts are
exhausted.
6. Display a success message if the user guesses correctly.
7. Show the correct number if the user fails to guess within the given
attempts.
8. Allow restarting the game for another round.

2. Student Grade Calculator

The system must be able to:

1. Accept input marks of a student in one or more subjects.


2. Validate that the entered marks are within an acceptable range (e.g.,
0– 100).
3. Calculate the total and average percentage of the student.
4. Assign grades based on predefined criteria (e.g., A, B, C, D, F).
5. Display the results (total marks, percentage, and grade) clearly to the
user.
6. Handle invalid inputs gracefully (e.g., non-numeric values or marks
out of range).
7. Allow multiple students’ data to be calculated one after another (if
required).
8. Provide an option to exit the program after calculation.

23 | P a g
e
3.2 NON-FUNCTIONAL REQUIREMENTS
1. Number Game

1. Usability:
o The game should have a simple and user-friendly interface.
o Instructions should be clear so that even beginners can play
easily.
2. Performance:
o The game should generate results instantly without noticeable
delays.
o The random number must be generated efficiently.
3. Reliability:
o The system should provide consistent results each time it is
played.
o It should not crash or terminate unexpectedly during execution.
4. Portability:
o The game should run on multiple platforms (Windows, Linux,
etc.) where the programming language is supported.
5. Maintainability:
o The code should be written in a structured and modular way
for easy updates or improvements.

2. Student Grade Calculator

1. Accuracy:The calculation of average percentage and grades must


be precise and error-free.
2. Usability:
o The interface should be simple, with clear prompts for
entering marks and displaying results.
o The grading system should be easily understandable.
3. Efficiency:
o The program should calculate and display results quickly,
even for multiple students.
4. Reliability:
o The system should handle invalid inputs (e.g., negative
marks or non-numeric values) without crashing.
5. Scalability:
o The system should be flexible enough to handle more
subjects or extended grading rules in the future.
6. Maintainability:
o The source code should be clean, well-documented, and easy
to modify for new grading criteria or additional features.

24 | P a g
e
CHAPTER 4: IMPLEMENTATION

4.1 Number Game

Generate a random number within a specified range, such as 1 to


[Link] the user to enter their guess for the generated number.
Compare the user's guess with the generated number and provide
feedback on whether the guess is correct, too high, or too low. Repeat
steps 2 and 3 until the user guesses the correct number. You can
incorporate additional details as follows: Limit the number of attempts
the user has to guess the number. Add the option for multiple rounds,
allowing the user to play again. Display the user's score, which can be
based on the number of attempts taken or rounds won.

CODE:

import [Link];

class cal

public static int getrandN(int min, int max)

return (int) ([Link]() * (max - min + 1) + min);

public static void main(String arg[])

[Link](" ");

[Link]("NUMBER GAME");

[Link]("

");

[Link]("NUMBER GAME RANGE IS BETWEEN 1 TO 100");

[Link]("HEY YOU HAVE " + 5 + " CHANCES TO WIN");

int user_choice, finalscore = 0;

Scanner sc = new Scanner([Link]);

25 | P a g
e
26 | P a g
e
[Link]("1-> WANT TO PLAY

GAME"); [Link]("2-> EXIT");

[Link]("ENTER CHOICE OF USER= ");

int ch = [Link]();

switch (ch)

case 1:

boolean playagain = true;

while (playagain)

int Random_Number = getrandN(1, 100);

boolean guess = false;

for (int i = 1; i <= 5; i++)

[Link]("Round" + i);

[Link]("ENTER NUMBER OF YOUR CHOICE USER= ");

user_choice = [Link]();

if (user_choice == Random_Number)

guess = true;

finalscore++;

[Link]("CONGRATULATION YOU WIN");

break;

else if (user_choice > Random_Number)

27 | P a g
e
[Link]("USER CHOICED NUMBER IS LARGER.");

else

[Link]("USER CHOICED NUMBER IS SMALLER.");

if (guess = false)

[Link]("YOU LOST YOUR CHANCE NUMBER IS" +


Random_Number);

[Link]("WANT TO PLAY AGAIN(YES/NO)=");

String chAgain = [Link]();

playagain = [Link]("YES");

[Link]("HOPE YOU ENJOY THIS GAME");

[Link]("SCORE YOU GET=" + finalscore);

case 2:

[Link]("THANKU TO USING THE NUMBER GAME");

break;

default:

[Link]("INVALID CHOICE. PLEASE TRY AGAIN.");

28 | P a g
e
4.2 Student Grade Calculator
Take marks obtained (out of 100) in each subject. Calculate Total
Marks: Sum up the marks obtained in all subjects. Calculate Average
Percentage: Divide the total marks by the total number of subjects to
get the average percentage. Grade Calculation: Assign grades based on
the average percentage achieved. Display Results: Show the total
marks, average percentage, and the corresponding grade to the user.
CODE:
import [Link];
class cal
{
public static void main(String arg[])
{
[Link](" ");
[Link]("STUDENT GRADE CALCULATOR");
[Link](" ");
int totalmarks, subject, sumofmarks = 0;
float avgpercent = 0.0f;
Scanner sc = new Scanner([Link]);
[Link]("HOW MANY SUBJECT YOU HAVE=");
subject = [Link]();
for (int i = 1; i <= subject; i++)
{
[Link]("ENTER THE MARK OF " + i + " SUBJECT= ");
totalmarks = [Link]();
sumofmarks += totalmarks;
[Link]("TOTAL MARKS= " + sumofmarks);
}
avgpercent = sumofmarks / subject;
[Link]("AVERAGE PERCENTAGE= " + avgpercent);
if (avgpercent >= 90)
{
[Link]("A1 GRADE");

29 | P a g
e
}
else if (avgpercent >= 80)
{
[Link]("A2 GRADE");
}
else if (avgpercent >= 70)
{
[Link]("B1 GRADE");
}
else if (avgpercent >= 60)
{
[Link]("B2 GRADE");
}
else if (avgpercent >= 50)
{
[Link]("C1 GRADE");
}
else if (avgpercent >= 40 )
{
[Link]("C2 GRADE");
}
else if (avgpercent >= 33)
{
[Link]("D1 GRADE");
}
else if(avgpercent < 33)
{
[Link]("FAIL");
}
else
{
[Link]("NOT VALID FOR FOR MARKS");
}
}}

30 | P a g
e
4.3 Challenges & Learnings
1. Number Game
Challenges:
Designing an engaging yet simple game logic that balances difficulty and
fun.
Handling unexpected user inputs such as invalid or non-numeric entries
gracefully without crashing the program.
Implementing a user-friendly interface that clearly communicates game
status, clues, and outcomes.
Managing game state efficiently, especially tracking user attempts and
providing real-time feedback.
Learning:
Improved programming skills in logic development and control flow.
Gained experience in input validation and error handling to create robust
software.
Learned how to design interactive user interfaces that enhance user
engagement.
Developed problem-solving skills by debugging and refining game
mechanics for better user experience.
2. Student Grade Calculator
Challenges:
Defining accurate grading criteria and ensuring calculations reflect the
correct grade based on input scores.
Validating user inputs to prevent invalid marks (e.g., negative values or
marks exceeding maximum limits).
Ensuring the calculator is scalable for additional subjects or changes in
grading rules.
Presenting the results clearly and understandably for users with different
levels of technical knowledge.

31 | P a g
e
Learning:
Enhanced understanding of conditional logic and arithmetic operations in
programming.
Gained experience in form design and user input validation for reliable
data collection.
Learned about creating scalable and maintainable code architecture for
easy updates.
Improved skills in user experience design for presenting quantitative
results clearly.

32 | P a g
e
CHAPTER 5: RESULT AND ANALYSIS
Both the student grade calculator and number game projects effectively
demonstrate core Java programming concepts such as loops,
conditionals, user input handling, and output display. The grade
calculator focuses on processing numeric input to calculate averages and
assign grades, applying conditional logic to classify performance, while
the number game emphasizes interactive gameplay with random number
generation, limited attempts for guessing, and real-time feedback based
on user input. Each program offers clear user prompts and logical flow,
enhancing user experience, though both would benefit from improved
input validation and minor code fixes to handle edge cases more
robustly. These projects also teach modular programming principles, as
seen with the separate method for random number generation in the
game. Additionally, they provide valuable lessons in debugging,
algorithmic thinking, and efficient code structuring crucial for scalable
software development. Overall, they provide practical, beginner-friendly
experience in building functional applications that improve problem-
solving, critical thinking, and programming skills in a real-world context.
This foundation prepares learners for more complex software
development challenges by reinforcing basic concepts in a hands-on
manner. Moreover, these projects improve confidence in coding and
encourage best practices such as user engagement and iterative
development, which are vital for successful programming careers. Each
program offers clear user prompts and logical flow, enhancing user
experience, though both would benefit from improved input validation
and minor code fixes to handle edge cases more robustly. These projects
also teach modular programming principles, as seen with the separate
method for random number generation in the game. Overall, they provide
practical, beginner-friendly experience in building functional
applications that improve problem-solving, critical thinking, and
programming skills in a real-world context. This foundation prepares
learners for more complex software development challenges by
reinforcing basic concepts in a hands-on manner. Overall, they provide
practical, beginner-friendly experience in building functional
applications that improve problem-solving, critical thinking, and
programming skills in a real-world context. This foundation prepares
learners for more complex software development challenges by
reinforcing basic concepts in a hands-on manner. Moreover, these
projects improve confidence in coding and encourage best practices such
as user engagement and iterative development, which are vital for
successful programming careers.

33 | P a g
e
34 | P a g
e
5.1 NUMBER GAME

Result:

 The program starts by displaying the game title and instructions.


 It offers a menu to either play the game or exit.
 When the user chooses to play, the system generates a random number
between 1 and 100.
 The user has 5 chances (rounds) to guess the number.
 After each guess, the program tells the user whether their guess is
larger, smaller, or correct.
 If the user guesses correctly, the program congratulates and updates
the score.
 If the user doesn't guess correctly within 5 rounds, it reveals the
correct number.
 After each game, the user is asked if they want to play again.
 The program ends when the user chooses to exit from the menu or
after finishing the games.

Analysis:

 Random Number Generation: The program correctly uses a method


to generate a random number between a range.
 Game Loop: The main game runs in a while loop allowing multiple
rounds until the user quits.

35 | P a g
e
 Input Handling: The program properly reads user guesses and menu
selections using Scanner.
 Feedback: It provides clear responses indicating if the user’s guess is
too high, too low, or correct.
 Score Tracking: Keeps a running score of how many correct guesses
the user has made.
 Bug in Condition: The line if (guess = false) is an assignment, not a
comparison. It should be if (guess == false) or if (!guess). Due to this,
the lost chance message may incorrectly display during guessing
rounds.
 Switch Cases: The case 1 does not have a break before case 2, so after
finishing the game, it automatically goes to exit message. Adding a
break after the game loop would fix this.
 User Experience: Menu and replay options improve playability.
 Input Validation: The program does not validate if the user inputs
out- of-range numbers or non-integer inputs, which could lead to
exceptions or undesired behavior.
 Code Structure: The code is modular with getrandN method for
random number generation and uses loops and conditions effectively.

Key Recommendations:

 Fix the condition if (guess = false) to avoid logical errors.


 Add a break statement after case 1 to prevent fallthrough into the exit
case.
 Implement input validation to handle invalid guesses.
 Optionally, add comments and indentation to improve readability
further.
 Consider closing the Scanner object to free resources.

36 | P a g
e
5.2 STUDENT GRADE CALCULATOR

Result:

 The program prompts the user to enter the number of subjects.


 It then takes marks for each subject in a loop.
 After each input, it displays the cumulative total marks so far.
 Once all inputs are collected, it calculates the average percentage by
dividing the sum of marks by the number of subjects.
 Based on the average percentage, the program assigns a grade
according to specified criteria:
 90 and above: A1 Grade
 80 to 89: A2 Grade
 70 to 79: B1 Grade
 60 to 69: B2 Grade
 50 to 59: C1 Grade
 40 to 49: C2 Grade
 33 to 39: D1 Grade
 Below 33: Fail
 It then prints the average percentage and corresponding grade.

Analysis:

 Functionality: The code correctly computes the total marks


and average percentage for any number of subjects.
 Grade Logic: The grade assignment is based on accurate
conditional checks matching real-world academic grading systems.

37 | P a g
e
 Data Types: The average percentage uses a float, but due to
integer division in avgpercent = sumofmarks / subject; the result
might be truncated. This can be improved by type casting or using
floating- point division for accuracy.
 User Interaction: The program clearly prompts for inputs and displays
intermediate totals, aiding user understanding.
 Code Structure: The program uses straightforward procedural code
and a loop for input collection, making it easy to read and
maintain.
 Input Validation: There is no input validation (e.g.,
preventing negative or unrealistic marks), which could be a
point for improvement.
 Edge Cases: The last else block ("NOT VALID FOR FOR
MARKS") is unreachable because all possible averages are covered
by previous conditions.

38 | P a g
e
39 | P a g
e
CHAPTER 6: CONCLUSION
The student grade calculator and number game projects represent
foundational steps in building practical programming skills using Java. They
provide hands-on experience in core programming concepts such as loops,
conditions, input/output operations, and modular design principles. The
grade calculator project introduces critical thinking about numeric data
processing, enabling users to input multiple values, calculate averages, and
classify performance through graded outputs. It lays the groundwork for
understanding how real- world educational software can automate evaluation
processes. Meanwhile, the number game illustrates interactive programming,
randomization, control flow, and user decision-making, enhancing
engagement and problem-solving abilities.

Both projects foster essential skills like debugging, user-centric design, and
program structure, which are vital in professional software development. By
overcoming challenges such as input validation, error handling, and logical
flow management, learners gain confidence to innovate and extend software
functionality. These projects also illustrate the importance of iterative
development cycles and testing to achieve robust applications.

The practical knowledge gained through these assignments can be expanded


by integrating graphical user interfaces, persistent data storage, and web or
mobile platforms, thus bridging foundational knowledge with advanced
software solutions. They encourage learners to think about scalability,
usability, and real-world relevance in software design, setting a strong
foundation for future growth. Ultimately, these projects not only enhance
coding proficiency but also instill critical analytical, organizational, and
technical skills essential for a successful career in software engineering.

If desired, these projects can serve as stepping stones towards more complex
applications such as comprehensive academic management systems or
immersive educational games, highlighting their enduring relevance.

Future Scope:

The student grade calculator can be significantly enhanced by integrating


features such as a graphical user interface (GUI) for ease of use, allowing
teachers and students to input marks more interactively. It can be expanded
to

40 | P a g
e
41 | P a g
e
handle multiple students with data storage using databases or files, enabling
persistent record-keeping and retrieval. Advanced analytics could be
incorporated, such as performance trends, grade predictions using machine
learning, and generating detailed reports. Integration with web technologies
can turn it into an online grading system accessible on various devices.

Similarly, the number game project has potential for future growth by adding
levels of difficulty, timers, leaderboards, and multiplayer modes to increase
engagement. A GUI-based version or a mobile app could enhance user
experience with graphics and sounds. Additionally, adaptive difficulty using
algorithms can improve the challenge level based on player skill. Both
projects can benefit from incorporating input validation and error handling to
make them robust and user-friendly. Integrating these projects into larger
educational platforms could also improve learning outcomes through
gamification and automated assessment.

42 | P a g
e
REFRENCES
1. W3Resource, "Java Project - Student Grade System,"
[Link], A comprehensive guide demonstrating how to
implement student grade calculation with code examples and ideas for
extension using arrays and OOP.
2. Tech Crash Course, "Java Program to Calculate Grade of
Students," [Link]. Explains using conditional statements
and switch cases to categorize student grades programmatically.
3. GeeksforGeeks, "Student Grade Calculator using Java
Swing," [Link]. Details implementing a user-friendly
graphical interface for student grade calculation.
4. IJCRT, "Student Grading System Research Paper," International
Journal”. Discusses automation of academic evaluation systems,
database integration, security, and usability aspects.
5. GitHub Repository:
Task1: [Link]
Task2: [Link]

6. TutorialsPoint, "Student Grade Calculator using Java


Swing," [Link], May 2023. Step-by-step tutorial on building
and designing student grade applications with GUI.

7. YouTube, "Java Program to Calculate Student Grades," published


October 2024. Video tutorial demonstrating coding and testing
student grade calculator programs in Java.

8. GeeksforGeeks, "Number Guessing Game in Java,"


[Link], August 3, 2020. Description and source code
related to building interactive number guessing games in Java.

9. Offer Letter
[Link]
QD3HL/view

[Link]
[Link]
8mQBE yDD2Kn8on/view

43 | P a g
e

You might also like