Skip to content

Commit

Permalink
Merge pull request #230 from iamputradanish/master
Browse files Browse the repository at this point in the history
Populated police records with 20 contacts
  • Loading branch information
ongweekeong authored Nov 8, 2018
2 parents ce96379 + 1206b2b commit acc16ab
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies {
}

shadowJar{
archiveName = '[F-10][PRISM].jar'
archiveName = '[F10-3][PRISM].jar'

destinationDir = file("${buildDir}/jar/")
}
Expand Down
File renamed without changes
File renamed without changes
164 changes: 155 additions & 9 deletions src/seedu/addressbook/storage/StorageFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public AddressBook load() throws StorageOperationException, IllegalValueExceptio
save(populated);
return populated;


// other errors
} catch (IOException ioe) {
throw new StorageOperationException("Error writing to file: " + path);
Expand All @@ -148,23 +149,168 @@ public String getPath() {
}

//@@iamputradanish
public AddressBook populatedPoliceRecords() throws IllegalValueException {
private AddressBook populatedPoliceRecords() throws IllegalValueException {
return new AddressBook(new UniquePersonList(
new Person(
new Name("John Doe"),
new NRIC("s1234567a"),
new DateOfBirth("1996"),
new Name("AJ Styles"),
new NRIC("s8012345a"),
new DateOfBirth("1980"),
new PostalCode("510246"),
new Status("xc"),
new Offense("none"),
Collections.singleton(new Offense("riot"))),
Set.of(new Offense("theft"), new Offense("assault"))),
new Person(
new Name("Jane Doe"),
new Name("Becky Lynch"),
new NRIC("s9611234c"),
new DateOfBirth("1997"),
new PostalCode("510246"),
new DateOfBirth("1996"),
new PostalCode("948372"),
new Status("xc"),
new Offense("none"),
Set.of(new Offense("riot"))),
new Person(
new Name("Brock Lesnar"),
new NRIC("s7512345a"),
new DateOfBirth("1975"),
new PostalCode("213456"),
new Status("clear"),
new Offense("none"),
Set.of(new Offense("none"))),
new Person(
new Name("Cesaro"),
new NRIC("s8812341g"),
new DateOfBirth("1988"),
new PostalCode("402917"),
new Status("wanted"),
new Offense("murder"),
Set.of(new Offense("kidnap"))),
new Person(
new Name("Pete Dunne"),
new NRIC("s9443567h"),
new DateOfBirth("1994"),
new PostalCode("234567"),
new Status("xc"),
new Offense("none"),
Set.of(new Offense("piracy"), new Offense("assault"))),
new Person(
new Name("Ronda Rousey"),
new NRIC("s9154362c"),
new DateOfBirth("1991"),
new PostalCode("567342"),
new Status("clear"),
new Offense("none"),
Set.of(new Offense("none"))),
new Person(
new Name("Sheamus"),
new NRIC("s8512356e"),
new DateOfBirth("1985"),
new PostalCode("908371"),
new Status("clear"),
new Offense("none"),
Set.of(new Offense("none"))),
new Person(
new Name("Seth Rollins"),
new NRIC("s9012345k"),
new DateOfBirth("1990"),
new PostalCode("975241"),
new Status("wanted"),
new Offense("assault"),
Set.of(new Offense("riot"))),
new Person(
new Name("Shinsuke Nakamura"),
new NRIC("s8412345c"),
new DateOfBirth("1984"),
new PostalCode("738492"),
new Status("xc"),
new Offense("none"),
Set.of(new Offense("cheating"), new Offense("theft"))),
new Person(
new Name("Adam Cole"),
new NRIC("s9677843c"),
new DateOfBirth("1996"),
new PostalCode("545246"),
new Status("clear"),
new Offense("none"),
Set.of(new Offense("none"))),
new Person(
new Name("Aleister Black"),
new NRIC("s9212386d"),
new DateOfBirth("1992"),
new PostalCode("125773"),
new Status("xc"),
new Offense("none"),
Set.of(new Offense("robbery"), new Offense("rape"))),
new Person(
new Name("Alexa Bliss"),
new NRIC("s9898325j"),
new DateOfBirth("1998"),
new PostalCode("876524"),
new Status("wanted"),
new Offense("rape"),
Set.of(new Offense("none"))),
new Person(
new Name("Apollo Crews"),
new NRIC("s8988374e"),
new DateOfBirth("1989"),
new PostalCode("214563"),
new Status("xc"),
new Offense("none"),
Set.of(new Offense("riot"))),
new Person(
new Name("Baron Corbin"),
new NRIC("s9001235z"),
new DateOfBirth("1990"),
new PostalCode("468974"),
new Status("wanted"),
new Offense("murder"),
Set.of(new Offense("robbery"), new Offense("theft"))),
new Person(
new Name("Randy Orton"),
new NRIC("s8298760a"),
new DateOfBirth("1982"),
new PostalCode("568986"),
new Status("xc"),
new Offense("none"),
Set.of(new Offense("assault"))),
new Person(
new Name("Paul Heyman"),
new NRIC("s7656436d"),
new DateOfBirth("1976"),
new PostalCode("987764"),
new Status("clear"),
new Offense("none"),
Set.of(new Offense("none"))),
new Person(
new Name("Matt Hardy"),
new NRIC("s8712392n"),
new DateOfBirth("1987"),
new PostalCode("928716"),
new Status("xc"),
new Offense("none"),
Set.of(new Offense("theft"))),
new Person(
new Name("Jeff Hardy"),
new NRIC("s9023472c"),
new DateOfBirth("1990"),
new PostalCode("029837"),
new Status("clear"),
new Offense("none"),
Set.of(new Offense("none"))),
new Person(
new Name("John Cena"),
new NRIC("s8017234a"),
new DateOfBirth("1980"),
new PostalCode("920175"),
new Status("xc"),
new Offense("none"),
Set.of(new Offense("robbery"), new Offense("assault"))),
new Person(
new Name("Kevin Owens"),
new NRIC("s9128391f"),
new DateOfBirth("1991"),
new PostalCode("928615"),
new Status("xc"),
new Offense("none"),
Collections.singleton(new Offense("riot")))));
Set.of(new Offense("riot"), new Offense("theft")))
));
}
}
2 changes: 1 addition & 1 deletion src/seedu/addressbook/ui/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-fx-font-size: 10pt;
-fx-padding: 0 325 250 0;
-fx-cursor: crosshair;
-fx-background-image: url("file:resources/PrismBackground.png");
-fx-background-image: url(http://www.simontuckett.com/_Portfolio/PortImages_Pres/P_Il_Prism.jpg);
}

.text-field {
Expand Down
2 changes: 1 addition & 1 deletion src/seedu/addressbook/ui/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private MainWindow createMainWindow(Stage stage, Stoppable mainApp) throws IOExc
loader.setLocation(Main.class.getResource("ui/mainwindow.fxml"));
stage.setTitle(version);
stage.setScene(new Scene(loader.load(), INITIAL_WINDOW_WIDTH, INITIAL_WINDOW_HEIGHT));
stage.getIcons().add(new Image("file:resources/SPF.png"));
stage.getIcons().add(new Image("file:src/resources/SPF.png"));
stage.show();
MainWindow mainWindow = loader.getController();
mainWindow.setLogic(logic);
Expand Down

0 comments on commit acc16ab

Please sign in to comment.