0% found this document useful (0 votes)
2 views2 pages

MethodTask 9july

The document outlines four programming scenarios: calculating total marks for a student, determining the area of a circle, calculating an electricity bill based on units consumed, and checking if a student has passed based on their marks. Each scenario includes specific requirements for input, processing, and output. The concepts involved include methods with arguments and return types.

Uploaded by

rajyadav8948raj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

MethodTask 9july

The document outlines four programming scenarios: calculating total marks for a student, determining the area of a circle, calculating an electricity bill based on units consumed, and checking if a student has passed based on their marks. Each scenario includes specific requirements for input, processing, and output. The concepts involved include methods with arguments and return types.

Uploaded by

rajyadav8948raj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like