se-edu / addressbook-level25 Goto Github PK
View Code? Open in Web Editor NEW:ab::three: Address Book sample application (Level 2.5)
Home Page: https://se-edu.github.io/addressbook-level25
License: MIT License
:ab::three: Address Book sample application (Level 2.5)
Home Page: https://se-edu.github.io/addressbook-level25
License: MIT License
Some students use AB-3 as the basis for their project. They need a gradle task to build their product as a jar file.
Fix suggested by @pyokagan
diff --git a/build.gradle b/build.gradle
index 0a42902..255ef06 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,8 +7,13 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id 'java'
id 'org.asciidoctor.convert' version '1.5.6'
+ id 'com.github.johnrengelman.shadow' version '2.0.3'
+ id 'application'
}
+// Specifies the entry point of the application
+mainClassName = 'seedu.addressbook.Main'
+
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
@@ -41,6 +46,12 @@ dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
+shadowJar {
+ archiveName = 'addressbook.jar'
+
+ destinationDir = file("${buildDir}/jar/")
+}
+
task wrapper(type: Wrapper) {
gradleVersion = '4.8.1'
}
e.g. DuplicateTagException
or copy from level 2
We can show details such as total persons and existing tags somewhere in the GUI.
The GUI can be made a bit more sophisticated anyway. The current one is too simple.
Change the Contributors
section similar to level1
From LearningOutcomes.md:
- Implement the
StorageStub
such that calls to thesave
method do nothing (i.e. empty method body).
Since some of the test cases uses a non-empty AddressBook
, LogicTest.assertCommandBehavior(...)
will try to compare the expected non-empty AddressBook
, with the AddressBook
'residing' on the storage (which is empty since the method does not attempt to retain the content in any way), resulting in failing test cases.
Please advise.
These tests should cover all user commands. This is a replacement for file I/O tests we had in level 2.
While the directory/package structure does not have to be exactly the same, it is still beneficial for the overall project if they are as similar to each other as possible to ease porting of code from one level to another.
Making them the same would allow us to share the build.gradle
file between levels (for e.g. CI )
Main sources should be moved to src/main/java
.
Test sources should be moved to src/test/java
.
Having consistent package names will make it easier to port code from one level to another. It will also make it clear that different levels build upon each other.
seedu.addressbook
should be renamed to seedu.address
.
Main
should be renamed to MainApp
.seedu.addressbook.common
should be renamed to seedu.address.commons
.
seedu.addressbook.data
should be renamed to seedu.address.model
.
seedu.addressbook.data.exception
should be renamed to seedu.address.commons.exceptions
.
seedu.addressbook.commands
should be renamed to seedu.address.logic.commands
.
seedu.addressbook.parser
should be renamed to seedu.address.logic.parser
.
e.g. public ClearCommand() {}
help screen needs formatting.
help text for viewall
reads the same a view
.
Add logging, preferably with a rolling log file.
Perhaps limit to a few levels: DEBUG, INFO, WARNING, ERROR?
Based on the list given by my student Tek In ( @0WN463 ) these are the things missing in AB-3 as compared to AB-4
Please feel free to close this issue or mark as duplicate if these items are already recorded and being addressed.
Should be setUp()
or copy from level 2
or copy from level 2
Although it is not a learning outcome of this level, we can still set up for the convenience of developers and contributors.
or copy from level 2
Although it is not a learning outcome of this level, we can still set up for the convenience of developers and contributors.
or copy from level 2
Some students have reported that the executable jar file created by eclipse doesn't run on Windows but runs on Mac. The app runs within the IDE though.
In the current implementation, logic is calling initializeStorage()
method which creates the storage file object. For LO-DIP and later LO-OCP we explain the following:
Using DIP and making StorageFile
extend Storage
helps OCP as well, because, we can pass any object that is Storage and logic should pick it up.
As long as initializeStorage()
is creating the correct type of storage object inside Logic
, logic is not closed for modification.
I suggest we move creating the storage object to MainWindow
and call Logic::setStorage
from there to set the underlying storage.
or copy from level 2
or copy from level 2
or copy from level 2
or copy from level 2
The current one doesn't use any CSS styling.
Ensure that this project works with Java 9. Even better if we can have both Java 9 and 10 compatibility.
as per title
Our application always saves to addressbook.txt
.
User might want to have more than one address book. We need a way for the user to change the save location.
Let's implement a feature whereby the user is able to change the save location by passing in a command line parameter. For example, the user can execute java seedu.addressbook.Main mynewbook.txt
in the command line. The application will then save the address book content inside mynewbook.txt
instead of addressbook.txt
.
Implementation details:
Application.getParameters()
to obtain the command line parameter that the user may have typed in.StorageFile#StorageFile(String filePath)
.The relative links of "Useful Links" in the README are successfully replaced when viewed alone, doc/UserGuide.md becomes https://github.com/se-edu/addressbook-level3/blob/master/doc/UserGuide.md, which is correct.
However when viewed from the repo's main page, doc/UserGuide.md becomes https://github.com/se-edu/doc/UserGuide.md, which results in a 404 Not Found error
Can anyone else confirm this behavior? It appears that addressbook-level2 also has this issue. Other repos are behaving normally, such as HubTurbo.
To reproduce:
src/seedu/addressbook/data
foldertouch test
to create a new filegit status
- notice git did not track the newly created fileThis is caused by the data/
line in the .gitignore
file. If the intention was to ignore the data directory at the root, /data/
should be used instead. In addition, if this was a file local only to a single developer, it might be better to add it to .git/info/exclude
instead
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.