Answer to Question #272853 in Java | JSP | JSF for xysssd

Question #272853

Build a class Project with id(int) , desc (String), duration (int) , budget (double) and members (ArrayList of Workers). a. Provide a parameterized constructor Project (int id, String desc, double budget). The member array will be initialized as empty array and the initial duration of the project will be 0 b. Provide setters for description and budget and getters for all except members list. Provide a method getTotalCost() that calculates the total cost of the project by summing the budget and the salary of each member of the project. The salary of each m ember can be found by calculating an appropriate method of the Worker class.


1
Expert's answer
2021-11-28T11:44:38-0500
public class Project {
  int id;
  String desc;
  int duration;
  double budget;
  Arraylist<Worker> workers;

  Project(int id, String desc, double budget) {
    this.id = id;
    this.desc = desc;
    this.budget = budget;
  }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS