Skip to content

Instantly share code, notes, and snippets.

View yunpengn's full-sized avatar
:octocat:
Coding

Yunpeng Niu yunpengn

:octocat:
Coding
View GitHub Profile
@yunpengn
yunpengn / copyright.tex
Last active August 26, 2018 04:25
Copyright notes for Yunpeng's CS1101S slides
@yunpengn
yunpengn / specification.md
Last active April 11, 2018 17:39
CS2102 Project Technical Specification
@yunpengn
yunpengn / PersonAddressContactNumber.java
Last active September 6, 2017 09:47
CS2103T AY2017/2018 Semester 1
package classObjectDiagram;
public class Main {
public static void main(String[] args) {
// Step 1
Address homeA = new Address("Prince George's Park");
// Step 2
Person a = new Person("Alfred", homeA);
Person b = new Person("Bruce", homeA);
@yunpengn
yunpengn / BoxItemCard.java
Created September 6, 2017 02:15
[CS2103T][W4.3d][Exercise 1] at https://nus-cs2103.github.io/website/
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
Item item1 = new Item();
Item item2 = new Item();
Box box1 = new Box(item1);
Box box2 = new Box(item2);
item2.setMainCard(new Card());
@yunpengn
yunpengn / CodeQuality.java
Last active September 2, 2017 02:28
Code quality exercise for CS2103T @ NUS SoC (AY2017/2018 Semester 1)
public Class CodeQuality {
private static final String MESSAGE_COMMAND_HELP_PARAMETER = "Parameters: %1$s";
private static final String MESSAGE_COMMAND_HELP_EXAMPLE = "Example: %1$s";
private static final String MESSAGE_COMMAND_INVALID_FORMAT = "Invalid command format: %1$s";
private static final String MESSAGE_DISPLAY_PERSON_DATA = "%1$s Phone Number: %2$s Email: %3$s";
private static final String MESSAGE_GOODBYE = "Exiting Address Book... Good bye!";
/** List of all persons in the address book. */
private static final ArrayList<String> people = new ArrayList<>();