Question: java Objectives: In this lab we are going to practice how to write our own class with some methods and use it in our main

java java Objectives: In this lab we are going to practice how to

Objectives: In this lab we are going to practice how to write our own class with some methods and use it in our main program. Write a java program that fulfil the following: 1- Define a class named (Course) 2- Define 3 privet attributes (string Course_name, int Course_number, double credit) 3- Define 2 constructors one with no parameters (set the values to zero and the name to unknown) and parametrized constructor use the input parameters. 4- Write 3 set methods (one for each attributes). 5- Write 3 get methods (one for each attributes). 6- Write public method to print the object state. 7- Write a main method that: a. Define an object (call parametrized constructor) b. Call print method

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!