Question: A Java program to create objects and printout attribute values. Modify the program below using InteliJ or Netbeans Java, and submit the new copy on

A Java program to create objects and printout attribute values. Modify the program below using InteliJ or Netbeans Java, and submit the new copy on VPL for automatic grading.
Package student;
class student {
//ATTRIBUTE/PROPERTY SECTION
String studName, studDept;
int test1, test2, assign1, studNumber, totalMark;
}
public class student1 {
public static void main(String[] args) {
//CREATION OF OBJECT
student obj = new student();
stud.studName = "Teresia Aka";
//PRINTING SECTION-METHOD
System.out.println("Student Name: "+stud.studName);
}
}
Lab work:
(a) change the object name to stud
(b) create the following objects and assign these values to them:
studNumber 93100191
studDept Computer Science
test1 23
test2 18
assign1 20
(c) Only the attribute value for studName is currently printed, print out all the other attribute values
(d) The formula to calculate Total Mark is: totalMark = test1 + test2 + assign1
(e) Submit the modified program on VPL for automatic grading.

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!