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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions