Skip to content

Commit

Permalink
Add clear command
Browse files Browse the repository at this point in the history
  • Loading branch information
jianrong7 committed Nov 2, 2023
1 parent b1b9327 commit dc49882
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/java/seedu/address/logic/commands/ClearCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@

import seedu.address.model.AddressBook;
import seedu.address.model.Model;
import seedu.address.model.PropertyBook;

/**
* Clears the address book.
*/
public class ClearCommand extends Command {

public static final String COMMAND_WORD = "clear";
public static final String MESSAGE_SUCCESS = "Address book has been cleared!";
public static final String MESSAGE_SUCCESS = "Customer List and Property List have been cleared!";


@Override
public CommandResult execute(Model model) {
requireNonNull(model);
model.setAddressBook(new AddressBook());
model.setPropertyBook(new PropertyBook());
return new CommandResult(MESSAGE_SUCCESS);
}
}
2 changes: 1 addition & 1 deletion src/main/resources/view/PropertyListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<FlowPane fx:id="tags" />
<Label fx:id="phone" styleClass="cell_small_label" text="\$propPhone" />
<Label fx:id="address" styleClass="cell_small_label" text="\$propAddress" />
<Label fx:id="budget" styleClass="cell_small_label" text="\$budget" />
<Label fx:id="price" styleClass="cell_small_label" text="\$budget" />
</VBox>
</GridPane>
</HBox>

0 comments on commit dc49882

Please sign in to comment.