1.
Student Result
Scenario:
A school wants to calculate the total marks of a student.
Requirements:
● Create a method that accepts marks of 5 subjects.
● Return the total marks.
● Print the result in the main() method.
Concepts:
● Method with arguments
● Return type
[Link] Area
Scenario:
A drawing application needs to calculate the area of a circle.
Requirements:
● Accept radius.
● Return the area.
● Print the result.
[Link] Bill
Scenario:
An electricity department calculates the bill.
Requirements:
● Accept units consumed.
● Bill = units × ₹8
● Return total bill.
4. Student Pass/Fail
Scenario:
A school checks whether a student has passed.
Requirements:
● Accept marks.
● Return true if marks are 35 or more.
● Otherwise return false.