Skip to content
This repository was archived by the owner on Feb 12, 2023. It is now read-only.

Commit 6dd2f9c

Browse files
committed
Uncomment the TODOs
1 parent 33cc29a commit 6dd2f9c

File tree

7 files changed

+9
-15
lines changed

7 files changed

+9
-15
lines changed

src/controllers/AppStoreAPI.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ public boolean isValidAppName(String appName) {
233233
//---------------------
234234
// Persistence methods
235235
//---------------------
236-
// TODO UNCOMMENT THIS COMPLETED CODE block as you start working through this class
237-
//---------------------
236+
238237
@SuppressWarnings("unchecked")
239238
public void load() throws Exception {
240239
//list of classes that you wish to include in the serialisation, separated by a comma
@@ -286,4 +285,12 @@ public void sortAppsByNameAscending() {
286285
swapApps(apps, i, highestIndex);
287286
}
288287
}
288+
289+
/**
290+
* The number of apps that are currently in the list of apps
291+
* @return The count of apps that are currently in the list
292+
*/
293+
public int numberOfApps() {
294+
return apps.size();
295+
}
289296
}

src/models/Developer.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
import java.util.Objects;
44

55
public class Developer {
6-
7-
//TODO Nothing! The Developer class is completed!
8-
96
private String developerName = "<no developer>";
107
private String developerWebsite = "<no website>";
118

src/models/Rating.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ public class Rating {
77
private int numberOfStars = 0;
88
private String raterName = "<rater name>";
99
private String ratingComment = "<no comment>";
10-
11-
// TODO Nothing! This class is complete
1210

1311
public Rating(int numberOfStars, String raterName, String ratingComment) {
1412
setNumberOfStars(numberOfStars);

src/utils/ISerializer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package utils;
22

3-
// TODO Nothing! This class is complete but you need to implement this in DeveloperAPI and AppStoreAPI
4-
53
public interface ISerializer {
64
void save() throws Exception;
75
void load() throws Exception;

src/utils/RatingUtility.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
public class RatingUtility {
1010

11-
//TODO Nothing! This utility is completed!
12-
1311
private static List<String> listOfAuthors = new ArrayList<>(){{
1412
add("JohnD");
1513
add("Adam101");

src/utils/ScannerInput.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
public class ScannerInput {
77

8-
//TODO Nothing! This utility is completed!
9-
108
public static int validNextInt(String prompt) {
119
Scanner input = new Scanner(System.in);
1210
do {

src/utils/Utilities.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
public class Utilities {
66

7-
//TODO Nothing! This utility is completed! Note: you may decide to add other utility methods, however.
8-
97
/**
108
* This method takes in a decimal point number and truncates it to two decimal places. Note
119
* that the method does NOT round when truncating; the numbers after the two decimal places are

0 commit comments

Comments
 (0)