-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
30 lines (22 loc) · 808 Bytes
/
Main.java
File metadata and controls
30 lines (22 loc) · 808 Bytes
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
public class Main {
public static void main(String[] args) {
// int newScore = calculateScore("DJ",500);
// System.out.println("New score is " + newScore);
//
// calculateScore(75);
// calculateScore();
System.out.println("New score is " + calculateScore("DJ", 500));
System.out.println("New score is " + calculateScore(10));
}
public static int calculateScore(String playerName, int score){
System.out.println("Player " + playerName + " scored " + score + " points");
return score*100;
}
public static int calculateScore(int score){
return calculateScore("Anonymous",score);
}
public static int calculateScore(){
System.out.println("No player name, no player score");
return 0;
}
}