Previous Next
0 / 10
Module DEMO-33-64DEMO-OOP-33

Two-Class Grade Summary

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Build a two-file project with Main.java and GradeSummary.java.

Read two integers: coursework mark and exam mark.

GradeSummary must calculate the average as a double and return the exact line: Average = X.00 or with the correct two decimals.

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
80 90
Average = 85.00
Input: coursework = 80, exam = 90.
Key calculation: average = (80 + 90) / 2.0 = 85.00.
Output:
Average = 85.00
Sample #2
Public sample
75 76
Average = 75.50
Input: coursework = 75, exam = 76.
Key calculation: average = (75 + 76) / 2.0 = 75.50.
Output:
Average = 75.50

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings