Challenge 3: Calculate the Student's Total Marks
Explore how to build a Java class named Student with private fields for name and marks. Learn to implement methods that retrieve individual marks and calculate the total. Understand using default and parameterized constructors to initialize objects effectively.
We'll cover the following...
We'll cover the following...
Problem Statement
Write a Java class called Student with
-
privatefields:-
name(Stringtype) -
mark1andmark2(double type)
-
And methods:
-
...