Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

Sample run:

Student Name: Teresia Aka

Student Number: 93100191

Student Department: Computer Science

Test1: 23

Test2: 18

Assignment: 20

Total Mark: 61

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

develop your skills of project planning.

Answered: 1 week ago

Question

4. What decision would you make and why?

Answered: 1 week ago