SlideShare a Scribd company logo
1 of 15
-DIVYA S
B.TECH-IT
JAVA
 INTERNAL MARK CALCULATOR FOR ANNA VARSITY STUDENTS 

 /**








* @author DIVYA S
* @java version 1.1
* @SRI RAMANUJAR ENGINEERING COLLEGE
* @INFORMATION TECHNOLOGY
*/
import java.util.Scanner;


 /**









*
* * JAVA PROGRAM FOR INTERNAL MARK CALCULATOR *
*
*/
class InternalMark {
double attendance, avg, avgMark, internalmark, avgAttendance;
JAVA
 public double attendanceCalculation(double











attendedPeriods,
double totalPeriods) {
attendance = (attendedPeriods / totalPeriods) * 100;
if (attendance >= 75 && attendance <= 80) {
avgAttendance = 1;
return avgAttendance;
} else if (attendance > 80 && attendance <= 85) {
avgAttendance = 2;
return avgAttendance;
JAVA















} else if (attendance > 85 && attendance <= 90) {
avgAttendance = 3;
return avgAttendance;
} else if (attendance > 90 && attendance <= 95) {
avgAttendance = 4;
return avgAttendance;
} else if (attendance > 95 && attendance <= 100) {
avgAttendance = 5;
return avgAttendance;
} else {
avgAttendance = 0;
return avgAttendance;
}
}
JAVA














public double markCalculation(double mark) {
avg = (mark / 100) * 5;
avgMark = Math.round(avg);
return avgMark;
}
public double Internal(double attendance, double
avgUnit1Mark,
double avgUnit2Mark, double avgModelMark) {
internalmark = (attendance + avgUnit1Mark +
avgUnit2Mark + avgModelMark);
return internalmark;
}
}
JAVA

 public class InternalMarkCalculator {
 public static void main(String args[]) {
 Scanner s = new Scanner(System.in);
 InternalMark im = new InternalMark();
 int again;

 double unit1Mark, unit2Mark, modelMark,

avgUnit1Mark, avgUnit2Mark, avgModelMark,
attendance, totalPeriods, attendedPeriods, intm;
 String studentName, studentRegNo, studentDept,
studentSem, subject, subjectCode;
JAVA

 do {
 System.out
 .println("ENTER THE STUDENT NAME (without any








intial or space): ");
studentName = s.next();
System.out.println("ENTER THE STUDENT REGISTER
NUMBER: ");
studentRegNo = s.next();
System.out.println("ENTER THE STUDENT
DEPARTMENT: ");
studentDept = s.next();
System.out.println("ENTER THE STUDENT SEMESTER:
");
studentSem = s.next();
JAVA
 System.out.println("ENTER THE SUBJECT: ");
 subject = s.next();
 System.out.println("ENTER THE SUBJECT CODE: ");
 subjectCode = s.next();
 System.out.println("ENTER THE TOTAL PERIODS (in

numerical): ");
 totalPeriods = s.nextDouble();
 if (totalPeriods <= 0 || totalPeriods > 100)
 System.err.println("YOU HAVE ENTERED WRONG
INPUT!!!");
JAVA

 System.out
 .println("ENTER THE NUMBER OF PERIODS THAT










STUDENT ATTENDED (in numerical): ");
attendedPeriods = s.nextDouble();
if (attendedPeriods < 0 || attendedPeriods > 100)
System.err.println("YOU HAVE ENTERED WRONG
INPUT!!!");
if (attendedPeriods > totalPeriods)
System.err
.println("THE ATTENDED PERIODS MUST BE LESSER
THAN TOTAL PERIODS!!!");
System.out
.println("ENTER THE STUDENT's UNIT TEST-I MARK (in
numerical): ");
unit1Mark = s.nextDouble();
JAVA














if (unit1Mark < 0 || unit1Mark > 100)
System.err.println("YOU HAVE ENTERED WRONG INPUT!!!");
System.out
.println("ENTER THE STUDENT's UNIT TEST-II MARK (in
numerical): ");
unit2Mark = s.nextDouble();
if (unit2Mark < 0 || unit2Mark > 100)
System.err.println("YOU HAVE ENTERED WRONG INPUT!!!");
System.out
.println("ENTER THE STUDENT's MODEL EXAM MARK (in
numerical): ");
modelMark = s.nextDouble();
if (modelMark < 0 || modelMark > 100)
System.err.println("YOU HAVE ENTERED WRONG INPUT!!!");
JAVA















attendance = im
.attendanceCalculation(attendedPeriods, totalPeriods);
System.out.println("");
System.out.println("THE STUDENT AVERAGE ATTENDANCE IS (out
of 5): "
+ attendance);
avgUnit1Mark = im.markCalculation(unit1Mark);
System.out
.println("THE STUDENT AVERAGE UNIT-I MARK IS (out of 5): "
+ avgUnit1Mark);
avgUnit2Mark = im.markCalculation(unit2Mark);
System.out
.println("THE STUDENT AVERAGE UNIT-II MARK IS (out of 5): "
+ avgUnit2Mark);
avgModelMark = im.markCalculation(modelMark);
JAVA

 System.out.println("THE STUDENT AVERAGE MODEL










MARK IS (out of 5): "
+ avgModelMark);
System.out.println("");
intm = im.Internal(attendance, avgUnit1Mark,
avgUnit2Mark,
avgModelMark);
if (intm < 0 || intm > 20)
System.err.println("WRONG INTERNAL MARK!!!");
else
System.out.println("THE STUDENT INTERNAL MARK IS
(out of 20): "
+ intm);
JAVA

 System.out.println("");
 System.out.println("IF YOU WANT TO CONTINUE PRESS 5, ELSE

0!!!");
 again = s.nextInt();
 System.out.println("");
 } while (again == 5);












if (again == 0) {
System.out.println("YOU'VE BEEN EXITED!!!");
System.exit(again);
} else
System.err.println("WRONG INPUT!!!");
}
}
OUTPUT:
I HOPE THIS CODE
WILL BE USEFUL
FOR YOU 

HAVE A GREAT DAY!!!

More Related Content

What's hot

How To Test Everything
How To Test EverythingHow To Test Everything
How To Test Everythingnoelrap
 
Apex 5 plugins for everyone version 2018
Apex 5 plugins for everyone   version 2018Apex 5 plugins for everyone   version 2018
Apex 5 plugins for everyone version 2018Alan Arentsen
 
Introduction to nsubstitute
Introduction to nsubstituteIntroduction to nsubstitute
Introduction to nsubstituteSuresh Loganatha
 
Tdd for BT E2E test community
Tdd for BT E2E test communityTdd for BT E2E test community
Tdd for BT E2E test communityKerry Buckley
 
Debug - MITX60012016-V005100
Debug - MITX60012016-V005100Debug - MITX60012016-V005100
Debug - MITX60012016-V005100Ha Nguyen
 
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageabilityDaniel Fisher
 
From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017Agustin Ramos
 
exception handling in cpp
exception handling in cppexception handling in cpp
exception handling in cppgourav kottawar
 
Release your software anytime - feature toggles
Release your software anytime - feature togglesRelease your software anytime - feature toggles
Release your software anytime - feature togglesPragmateam
 
Automated Python Test Frameworks for Hardware Verification and Validation
Automated Python Test Frameworks for Hardware Verification and ValidationAutomated Python Test Frameworks for Hardware Verification and Validation
Automated Python Test Frameworks for Hardware Verification and ValidationBarbara Jones
 
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...PVS-Studio
 
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...Andrey Karpov
 
150412 38 beamer methods of binary analysis
150412 38 beamer methods of  binary analysis150412 38 beamer methods of  binary analysis
150412 38 beamer methods of binary analysisRaghu Palakodety
 
Exception handling in c programming
Exception handling in c programmingException handling in c programming
Exception handling in c programmingRaza Najam
 
Exception Handling
Exception HandlingException Handling
Exception HandlingAlpesh Oza
 

What's hot (20)

How To Test Everything
How To Test EverythingHow To Test Everything
How To Test Everything
 
CodeChecker summary 21062021
CodeChecker summary 21062021CodeChecker summary 21062021
CodeChecker summary 21062021
 
Bsit1
Bsit1Bsit1
Bsit1
 
Apex 5 plugins for everyone version 2018
Apex 5 plugins for everyone   version 2018Apex 5 plugins for everyone   version 2018
Apex 5 plugins for everyone version 2018
 
Introduction to nsubstitute
Introduction to nsubstituteIntroduction to nsubstitute
Introduction to nsubstitute
 
Tdd for BT E2E test community
Tdd for BT E2E test communityTdd for BT E2E test community
Tdd for BT E2E test community
 
Debug - MITX60012016-V005100
Debug - MITX60012016-V005100Debug - MITX60012016-V005100
Debug - MITX60012016-V005100
 
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
 
From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017
 
exception handling in cpp
exception handling in cppexception handling in cpp
exception handling in cpp
 
Exceptions in c++
Exceptions in c++Exceptions in c++
Exceptions in c++
 
Release your software anytime - feature toggles
Release your software anytime - feature togglesRelease your software anytime - feature toggles
Release your software anytime - feature toggles
 
Automated Python Test Frameworks for Hardware Verification and Validation
Automated Python Test Frameworks for Hardware Verification and ValidationAutomated Python Test Frameworks for Hardware Verification and Validation
Automated Python Test Frameworks for Hardware Verification and Validation
 
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
 
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
 
F6dc1 session6 c++
F6dc1 session6 c++F6dc1 session6 c++
F6dc1 session6 c++
 
150412 38 beamer methods of binary analysis
150412 38 beamer methods of  binary analysis150412 38 beamer methods of  binary analysis
150412 38 beamer methods of binary analysis
 
Exception handling
Exception handlingException handling
Exception handling
 
Exception handling in c programming
Exception handling in c programmingException handling in c programming
Exception handling in c programming
 
Exception Handling
Exception HandlingException Handling
Exception Handling
 

Similar to Internal mark calculator

Write a program Grader that that will be used by a program driver to.pdf
Write a program Grader that that will be used by a program driver to.pdfWrite a program Grader that that will be used by a program driver to.pdf
Write a program Grader that that will be used by a program driver to.pdfarjunenterprises1978
 
object oriented programming java lectures
object oriented programming java lecturesobject oriented programming java lectures
object oriented programming java lecturesMSohaib24
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummaryAmal Khailtash
 
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMEREVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMERAndrey Karpov
 
Pi j1.3 operators
Pi j1.3 operatorsPi j1.3 operators
Pi j1.3 operatorsmcollison
 
JS Fest 2019. Anjana Vakil. Serverless Bebop
JS Fest 2019. Anjana Vakil. Serverless BebopJS Fest 2019. Anjana Vakil. Serverless Bebop
JS Fest 2019. Anjana Vakil. Serverless BebopJSFestUA
 
From typing the test to testing the type
From typing the test to testing the typeFrom typing the test to testing the type
From typing the test to testing the typeWim Godden
 
Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDa...
Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDa...Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDa...
Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDa...InfluxData
 
Lecture#3 Algorithms and computing
Lecture#3 Algorithms and computingLecture#3 Algorithms and computing
Lecture#3 Algorithms and computingNUST Stuff
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy codeShriKant Vashishtha
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsFrancois Zaninotto
 
OXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART IOXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART IAbdul Rahman Sherzad
 

Similar to Internal mark calculator (20)

Ch5(loops)
Ch5(loops)Ch5(loops)
Ch5(loops)
 
Rest with-spray
Rest with-sprayRest with-spray
Rest with-spray
 
Write a program Grader that that will be used by a program driver to.pdf
Write a program Grader that that will be used by a program driver to.pdfWrite a program Grader that that will be used by a program driver to.pdf
Write a program Grader that that will be used by a program driver to.pdf
 
Comp102 lec 6
Comp102   lec 6Comp102   lec 6
Comp102 lec 6
 
object oriented programming java lectures
object oriented programming java lecturesobject oriented programming java lectures
object oriented programming java lectures
 
DSA 103 Object Oriented Programming :: Week 3
DSA 103 Object Oriented Programming :: Week 3DSA 103 Object Oriented Programming :: Week 3
DSA 103 Object Oriented Programming :: Week 3
 
Java
Java Java
Java
 
Comp102 lec 5.1
Comp102   lec 5.1Comp102   lec 5.1
Comp102 lec 5.1
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
 
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMEREVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
EVERYTHING ABOUT STATIC CODE ANALYSIS FOR A JAVA PROGRAMMER
 
Thinking Beyond ORM in JPA
Thinking Beyond ORM in JPAThinking Beyond ORM in JPA
Thinking Beyond ORM in JPA
 
Pi j1.3 operators
Pi j1.3 operatorsPi j1.3 operators
Pi j1.3 operators
 
JS Fest 2019. Anjana Vakil. Serverless Bebop
JS Fest 2019. Anjana Vakil. Serverless BebopJS Fest 2019. Anjana Vakil. Serverless Bebop
JS Fest 2019. Anjana Vakil. Serverless Bebop
 
From typing the test to testing the type
From typing the test to testing the typeFrom typing the test to testing the type
From typing the test to testing the type
 
Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDa...
Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDa...Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDa...
Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDa...
 
Lecture#3 Algorithms and computing
Lecture#3 Algorithms and computingLecture#3 Algorithms and computing
Lecture#3 Algorithms and computing
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy code
 
Java Part1
Java Part1Java Part1
Java Part1
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
 
OXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART IOXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART I
 

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Internal mark calculator

  • 2. JAVA  INTERNAL MARK CALCULATOR FOR ANNA VARSITY STUDENTS    /**       * @author DIVYA S * @java version 1.1 * @SRI RAMANUJAR ENGINEERING COLLEGE * @INFORMATION TECHNOLOGY */ import java.util.Scanner;   /**         * * * JAVA PROGRAM FOR INTERNAL MARK CALCULATOR * * */ class InternalMark { double attendance, avg, avgMark, internalmark, avgAttendance;
  • 3. JAVA  public double attendanceCalculation(double         attendedPeriods, double totalPeriods) { attendance = (attendedPeriods / totalPeriods) * 100; if (attendance >= 75 && attendance <= 80) { avgAttendance = 1; return avgAttendance; } else if (attendance > 80 && attendance <= 85) { avgAttendance = 2; return avgAttendance;
  • 4. JAVA               } else if (attendance > 85 && attendance <= 90) { avgAttendance = 3; return avgAttendance; } else if (attendance > 90 && attendance <= 95) { avgAttendance = 4; return avgAttendance; } else if (attendance > 95 && attendance <= 100) { avgAttendance = 5; return avgAttendance; } else { avgAttendance = 0; return avgAttendance; } }
  • 5. JAVA             public double markCalculation(double mark) { avg = (mark / 100) * 5; avgMark = Math.round(avg); return avgMark; } public double Internal(double attendance, double avgUnit1Mark, double avgUnit2Mark, double avgModelMark) { internalmark = (attendance + avgUnit1Mark + avgUnit2Mark + avgModelMark); return internalmark; } }
  • 6. JAVA   public class InternalMarkCalculator {  public static void main(String args[]) {  Scanner s = new Scanner(System.in);  InternalMark im = new InternalMark();  int again;  double unit1Mark, unit2Mark, modelMark, avgUnit1Mark, avgUnit2Mark, avgModelMark, attendance, totalPeriods, attendedPeriods, intm;  String studentName, studentRegNo, studentDept, studentSem, subject, subjectCode;
  • 7. JAVA  do {  System.out  .println("ENTER THE STUDENT NAME (without any        intial or space): "); studentName = s.next(); System.out.println("ENTER THE STUDENT REGISTER NUMBER: "); studentRegNo = s.next(); System.out.println("ENTER THE STUDENT DEPARTMENT: "); studentDept = s.next(); System.out.println("ENTER THE STUDENT SEMESTER: "); studentSem = s.next();
  • 8. JAVA  System.out.println("ENTER THE SUBJECT: ");  subject = s.next();  System.out.println("ENTER THE SUBJECT CODE: ");  subjectCode = s.next();  System.out.println("ENTER THE TOTAL PERIODS (in numerical): ");  totalPeriods = s.nextDouble();  if (totalPeriods <= 0 || totalPeriods > 100)  System.err.println("YOU HAVE ENTERED WRONG INPUT!!!");
  • 9. JAVA  System.out  .println("ENTER THE NUMBER OF PERIODS THAT          STUDENT ATTENDED (in numerical): "); attendedPeriods = s.nextDouble(); if (attendedPeriods < 0 || attendedPeriods > 100) System.err.println("YOU HAVE ENTERED WRONG INPUT!!!"); if (attendedPeriods > totalPeriods) System.err .println("THE ATTENDED PERIODS MUST BE LESSER THAN TOTAL PERIODS!!!"); System.out .println("ENTER THE STUDENT's UNIT TEST-I MARK (in numerical): "); unit1Mark = s.nextDouble();
  • 10. JAVA             if (unit1Mark < 0 || unit1Mark > 100) System.err.println("YOU HAVE ENTERED WRONG INPUT!!!"); System.out .println("ENTER THE STUDENT's UNIT TEST-II MARK (in numerical): "); unit2Mark = s.nextDouble(); if (unit2Mark < 0 || unit2Mark > 100) System.err.println("YOU HAVE ENTERED WRONG INPUT!!!"); System.out .println("ENTER THE STUDENT's MODEL EXAM MARK (in numerical): "); modelMark = s.nextDouble(); if (modelMark < 0 || modelMark > 100) System.err.println("YOU HAVE ENTERED WRONG INPUT!!!");
  • 11. JAVA               attendance = im .attendanceCalculation(attendedPeriods, totalPeriods); System.out.println(""); System.out.println("THE STUDENT AVERAGE ATTENDANCE IS (out of 5): " + attendance); avgUnit1Mark = im.markCalculation(unit1Mark); System.out .println("THE STUDENT AVERAGE UNIT-I MARK IS (out of 5): " + avgUnit1Mark); avgUnit2Mark = im.markCalculation(unit2Mark); System.out .println("THE STUDENT AVERAGE UNIT-II MARK IS (out of 5): " + avgUnit2Mark); avgModelMark = im.markCalculation(modelMark);
  • 12. JAVA  System.out.println("THE STUDENT AVERAGE MODEL          MARK IS (out of 5): " + avgModelMark); System.out.println(""); intm = im.Internal(attendance, avgUnit1Mark, avgUnit2Mark, avgModelMark); if (intm < 0 || intm > 20) System.err.println("WRONG INTERNAL MARK!!!"); else System.out.println("THE STUDENT INTERNAL MARK IS (out of 20): " + intm);
  • 13. JAVA  System.out.println("");  System.out.println("IF YOU WANT TO CONTINUE PRESS 5, ELSE 0!!!");  again = s.nextInt();  System.out.println("");  } while (again == 5);            if (again == 0) { System.out.println("YOU'VE BEEN EXITED!!!"); System.exit(again); } else System.err.println("WRONG INPUT!!!"); } }
  • 15. I HOPE THIS CODE WILL BE USEFUL FOR YOU  HAVE A GREAT DAY!!!