Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Complete the following tasks in Java within the lab time using NetBeans. Create a class called Student and has 5 instance variables 1. ID as

image text in transcribed
image text in transcribed
Complete the following tasks in Java within the lab time using NetBeans. Create a class called Student and has 5 instance variables 1. ID as a String 2. Name as a String 3. Age as a Integer 4. GPA as a Double 5. Time Table as a two dimensional Array of type string , that consist of name of subjects and credit hours, eg: [{OOP, 4}, {English, 3). {Quran, 2)... etc) Row : 5 or 4 Columns: 2 Your class should have a constructor that take the ID. Name, Age, an initial GPA and TimeTable (use them to initialize the students" GPA and Time Table). Your constructor should validate that the initial GPA is greater than 0, otherwise GPA should be initialized to the default value 4. Provide a set and a get method for each instant variable Ensure that the GPA in set method is grater than 0 otherwise do not change GPA value and print the following error Message: "The new value of the student GPA: (GPA value) is not an acceptable value please try again Add an option to Set method for Time Table that takes 3 parameters setTime Table (int row_index, String column Valuel, String column Value2), then add the following condition Reset Timtable if row_index

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

Step: 3

blur-text-image

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago