Question: 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

 3. Write a java program using Encapsulation for the following class

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 -mi: float -m2: float average() +display +getvalues()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!