You are required to write builds a record book for Projects being conducted at a department. A Project has an id, description, a list of members and start and end dates. 1. Provide following in the Project class
a. toString: to match the output that will be given till Saturday
b. getTeamSize(): that finds and returns the size of the team working on this project c.
import java.util.Date;
import java.util.List;
public class Project {
private int id;
private String description;
private List<Member> members;
private Date start;
private Date end;
public int getTeamSize() {
return members.size();
}
@Override
public String toString() {
return id + " " + description + " " + members + " " + start + " " + end;
}
}
Comments
Leave a comment