3. Write a java program using Encapsulation for the following class diagram. Get the values of name, id and 2 marks from the user using getvalues() function. Calculate the average of 2 marks inside...


3. Write a java program using Encapsulation for the following class diagram. Get the<br>values of name, id and 2 marks from the user using getvalues() function. Calculate the<br>average of 2 marks inside average () function. Display name, id and average inside<br>display() function. Use necessary Java class and Java main class. Create Java Main<br>class with your name ( 3 Marks)<br>Student<br>+name: String<br>#ID: int<br>|-m1: float<br>-m2: float<br>+average()<br>+display()<br>|+getvalues()<br>

Extracted text: 3. Write a java program using Encapsulation for the following class diagram. Get the values of name, id and 2 marks from the user using getvalues() function. Calculate the average of 2 marks inside average () function. Display name, id and average inside display() function. Use necessary Java class and Java main class. Create Java Main class with your name ( 3 Marks) Student +name: String #ID: int |-m1: float -m2: float +average() +display() |+getvalues()

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here