Search⌘ K

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.

Problem Statement

Write a Java class called Student with

  • private fields:

    • name(String type)

    • mark1 and mark2 (double type)

And methods:

  • ...