St.
Xavier’s High School ICSE, Nashik Road
Grade- 9 Sub: Computer Applications Marks - 25
PROJECT – SECOND TERM
Write Java program on the below mentioned topics:
Basic Calculator
• Create a basic calculator in Java that performs addition, subtraction,
multiplication, division and remainder.
o The program should allow the user to input two numbers and the
operation to be performed.
o Display the result.
Hint:
• Use do-while loop, if-else statement and switch case.
Kindly Refer Output screenshot
1|Page
Grade Calculator
• Write a Java program to calculate and display the final grade of a student
based on marks inputted for different subjects.
o Ask for the total marks obtained for each subject.
o Compute the percentage and display the corresponding grade (A, B, C,
etc.).
Hints:
• Use for loop and if-else statement.
percentage >= 90 grade = 'A'
percentage >= 80 grade = 'B'
percentage >= 70 grade = 'C'
percentage >= 60 grade = 'D'
else grade = 'E'
Kindly Refer Output screenshot
2|Page
Quiz Application
• Create a simple quiz program in Java.
o The program should ask the user 3-5 multiple-choice questions and
track their score.
o Display the correct answers and the user's total score at the end.
Hints:
• Use if-else statement.
• Refer a segment of program given below along with screenshot of the
output:
// Question 1
System.out.println("Question 1: What does CPU stand for?");
System.out.println("A. Computer Processing Unit");
System.out.println("B. Central Personal Unit");
System.out.println("C. Central Processing Unit");
System.out.println("D. Central Processor Unit");
System.out.print("Your answer: ");
char answer1 = Character.toUpperCase(scanner.next().charAt(0));
if (answer1 == 'C') {
System.out.println("Correct!");
score++;
} else {
System.out.println("Incorrect. The correct answer is C.");
}
3|Page
Simple To Do List
• Build a Java program that allows users to manage a simple To-Do list.
o Users should be able to add tasks, view all tasks and then exit.
Hint:
• Use do-while loop, if-else statement and switch case.
• Refer a segment of program given below along with screenshot of the
output:
switch (choice) {
case 1:
System.out.print("Enter the task: ");
String newTask = scanner.next();
if (task1 == null) {
task1 = newTask;
} else if (task2 == null) {
task2 = newTask;
} else if (task3 == null) {
task3 = newTask;
} else {
System.out.println("To-Do list is full! Complete or remove tasks before
adding more.");
}
break;
4|Page
Address Book
Design a simple address book application that allows users to add, view, and
delete contacts.
Hint:
• Use do-while loop and switch case.
• Refer a segment of program given below along with screenshot of the
output:
switch (choice) {
case 1:
System.out.print("Enter contact name: ");
contact = scanner.nextLine();
System.out.println("Contact added.");
break;
5|Page
Age Calculator
Create an age calculator that determines a person's age based on their birth
date?
Hint:
• Use ternary operator using if keyword.
• Refer a segment of program given below along with screenshot of the
output:
// Calculate age
int age = currentYear - birthYear;
if (currentMonth < birthMonth || (currentMonth == birthMonth && currentDay
< birthDay)) {
age--; // Decrement age if the birthday hasn't occurred yet this year
*************************************
6|Page
Note-
1. Kindly use the pages for writing the programs as used for the first
term project.
2. Use transparent folder to clip the pages.
3. Use proper comments to explain a particular statement.
4. Variable description is must.
5. Don’t attach Index page as there is only one program given.
6. Title of the project is already allotted in the class.
7. Printout of an output must be pasted after variable description
table. Kindly use window key, shift key and letter ‘s’ altogether to
take the screenshot of the output.
8. Refer to the screenshots of the output given after each topic.
9. The last date to submit the project of the Second Term will be
intimated later.
Each program should fulfill the following requirements:
Class Variable Coding and Execution of
Design Description Documentation Output
Coding should be
Program It should Output should be
done step by step , it
Should have Name displayed as per the
should be readable
have of the question asked.
and without any
suitable variable, Take a screenshot of
error. There should
class or Data type, the output after
be proper use of
class and the executing and paste
semicolons, brackets,
name purpose. in on the page.
functions etc.
7|Page