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 0\{ sub="Physics";marks=60;average=79.5; \} \} - Create a public static variable (test1) and a private static variable (test2) in the class below and assign the value 15 and 25 respectively. - Create a static method called change with one parameter that will assign the value for the testl variable. - Create a no parameterized constructor that initialize the instance variables as follows: - sub = "Physics"; - marks =60 - average =79.5 - Create a method that displays "pass" if the average value of the calling object is 60 or more and displays "fail" otherwise. class subject \{ private String sub; private int marks; private double average
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
