Question: Exercise 1 Consider the following class: public class Dog { Write its default constructor String name; String color: Write a code to declare an void

Exercise 1
Consider the following class:
public class Dog {
Write its default constructor String name; String color:
Write a code to declare an void barking 0( object from this class using the void hungry(){ default constructor
35
2ascy-Progamming 2-CS112-Lab_01
Exercise 2
Draw the UML diagram of the following class:
public class Employee {
String name;
double salary;
public Employee(){
}
public double getSalary(){
} return this.salary;
public String getName(){
}
void sleeping 0{
}
}
 Exercise 1 Consider the following class: public class Dog { Write

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!