In: Computer Science
Problem (by java): Every year, many students graduate from CCSIT set to fulfill their dreams and build their careers. The college would like to keep an electronic record of its graduates and what career paths they have chosen. Each graduate has an id, name, and a current you’re your assignment is to create:
In case of any query do comment. Please rate answer as well. Thanks
======Graduate.java=====
public class Graduate{
//private data members
private int id;
private String name;
private String current;
//empty constructor
public Graduate(){
}
//constructor which initalizes id , name and current
public Graduate(int id,String nm, String curr){
this.id = id;
this.name = nm;
this.current = curr;
}
//constructor which initalizes id , name
public Graduate(int id,String nm){
this.id = id;
this.name = nm;
}
//below method did not ask in your question ,just provided to access yoru data members
//accessors
public int getId(){
return this.id;
}
public String getName(){
return this.name;
}
public String getCurent(){
return this.current;
}
//mutators
public void setId(int id){
this.id = id;
}
public void setName(String nm){
this.name = nm;
}
public void setCurent(String curr){
this.current = curr;
}
}