Question: Use the code below to complete the tasks described below, use any java compiler to test your code. class subject { private String sub; private

Use the code below to complete the tasks described below, use any java compiler to test your code.
class subject{
private String sub;
private int marks;
private double average;
public subject(){
sub = "Physics";
marks =60;
average =79.5;
}
}
[This provides evidence for PC 3.5]
2- Create a static method called change with one parameter that will assign the value for the test1
variable.
[This provides evidence for PC 3.4]
3- Create a no parameterized constructor that initialize the instance variables as follows:
i. sub = "Physics";
ii. marks =60;
iii. average =79.5;
4- Create a method that displays "pass" if the average value of the calling object is 60 or more and
displays "fail" otherwise.
[This provides evidence for PC 3.7]
 Use the code below to complete the tasks described below, use

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!