-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProject.java
More file actions
60 lines (48 loc) · 1.53 KB
/
Project.java
File metadata and controls
60 lines (48 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import java.util.Scanner;
public class Project {
public String name;
public int innovation;
public int execution;
public int impact;
public int design;
public int pitch;
// A single Scanner instance for the entire class
private static Scanner scanner = new Scanner(System.in);
// Constructor: sets name and defaults scores to 0
public Project(String name) {
this.name = name;
this.innovation = 0;
this.execution = 0;
this.impact = 0;
this.design = 0;
this.pitch = 0;
}
// Method to input the innovation score
public void inputInnovationScore() {
System.out.print("Enter innovation score: ");
this.innovation = scanner.nextInt();
}
// Method to input the execution score
public void inputExecutionScore() {
System.out.print("Enter execution score: ");
this.execution = scanner.nextInt();
}
// Method to input the impact score
public void inputImpactScore() {
System.out.print("Enter impact score: ");
this.impact = scanner.nextInt();
}
// Method to input the design score
public void inputDesignScore() {
System.out.print("Enter design score: ");
this.design = scanner.nextInt();
}
// Method to input the pitch score
public void inputPitchScore() {
System.out.print("Enter pitch score: ");
this.pitch = scanner.nextInt();
}
public int totalScore() {
return innovation + execution + impact + design + pitch;
}
}