Question: QUESTION 1 - ERROR DEBUGGING You are given Program 1 (Test Project.java) with syntax errors. The program consists of three classes: Project, Team and Salary.

 QUESTION 1 - ERROR DEBUGGING You are given Program 1 (TestProject.java) with syntax errors. The program consists of three classes: Project, Teamand Salary. The program can be used to show team member informationsuch as project member information such as name and full salary. classProject private String projectName; arrayList team; public String getProjectName() { return projectName; } WWW 9 10 11 12 public void setProject (String pName

QUESTION 1 - ERROR DEBUGGING You are given Program 1 (Test Project.java) with syntax errors. The program consists of three classes: Project, Team and Salary. The program can be used to show team member information such as project member information such as name and full salary. class Project private String projectName; arrayList team; public String getProjectName() { return project Name; } WWW 9 10 11 12 public void setProject (String pName { projectName = pName; } 13 WARNA public arrayList getTeam ( { return team; } 14 15 16 17 18 19 20 21 22 23 24 25 26 77 arrayList t) public void setTeam team = t; } }//Project } //Project class Team private String name; private Salary salary; Team (double basic, double add, double rate) { salary = new salary (basic, add, rate); } public void setMember (String name) { this.name = name; } 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 public String toString() { return name; } public Salary getSalary 0 { return salary; } } //Team class Salary double b, add; double rate; double fullsalary; Salary (double basic, double x, double y) { 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 rate = y; add = x; b = basic; fullSalary = b + (add * rate); } WWWWWWWWW public String toString() { return b + + add + + fullsalary: 11 11 + rate + 11 T! + "Full salary: IT } //Salary 75 public class Test Project { public static void main (String[] args) 76 77 78 79 80 81 82 83 84 85 96 Project proiect = new Project (); project.setProject ("Project 1"); Team ti = new Team (9000, 1500, 0.5); ti.setMember ("Adam"); Team t2 = new Team (5000, 1000, 0.5); t2.setMember ("Siew"); Team t3 = new Team (9000, 2000, 0.25); t3.setMember ("Bob"); new arrayList(); arrayList tList = tList. Add (t1); tList. Add (t2); tList. Add (t3); OOOO mu for (Team x:tList) System.out.println(); project.setTeam (tList); System.out.println (project.getTeam () + " team member of " + project.getProiectName()); System.out.println ("#Member in this team: + tList.size 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 tList.remove (2); System.out.println("Display list (after remove):" + tList); System.out.println ("#Member in this team: + tList.size (); WWWWWWWWW Team tNew = new Team (8000, 2000, 0.25); tNew.setMember ("Zack"); II FI + W 114 115 116 117 118 119 120 121 122 123 124 125 126 tList.add (2, tNew); System.out.println("Display list (after add) : " + tList); System.out.println ("Team list and their full salary: "); System.out.println("#1 team member: " + tList.get (0) + ti.getSalary()); System.out.println("#2 team member: " + tList.get (1) + " + t2.getSalary ()); System.out.println ("#3 team member: " + tList.get (2) + tNew.getSalary ( ); System.out.println ("#Member in this team: + tList.size()); WARNU + 11 }//Test Project wwwwwwwwwwwwwww Program 1: Project, Team and Salary class relationship Debug the errors, then compile and run the program by using the given information in class TestProiect. Name Adam Siew Bob Zack Basic salary, salary added with rate 9000.0 1500.0 0.5 5000.0 1000.0 0.5 9000 2000 0.25 8000.0 2000.0 0.25 Figure below shows the output generated from this program: Adam Siew Bob [Adam, Siew, Bob] team member of Project 1 #Member in this team: 3 Display list (after remove): (Adam, Siew] #Member in this team: 2 Display list (after add): (Adam, Siew, Zack] Team list and their full salary: #1 team member: Adam 9000.0 1500.0 0.5 Full salary : 9750.0 #2 team member: Siew 5000.0 1000.0 0.5 Full salary : 5500.0 #3 team member: Zack 8000.0 2000.0 0.25 Full salary : 8500.0 #Member in this team: 3

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!