Skip to content
Snippets Groups Projects
Commit 9fe35f32 authored by Brady James Garvin's avatar Brady James Garvin
Browse files

Initial commit.

parents
No related branches found
No related tags found
No related merge requests found
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
!/.mvn/wrapper/maven-wrapper.jar
pom.xml 0 → 100644
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.unl.cse.soft160.library</groupId>
<artifactId>library</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>library</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
package edu.unl.cse.soft160.library;
public class App {
public static void main(String... arguments) {
Book book = new Book();
book.entry = "Frankenstein; or, the Modern Prometheus";
book.title = "Frankenstein";
book.subtitle = "or, the Modern Prometheus";
Library library = new Library();
library.add(book);
System.out.println(library);
}
}
package edu.unl.cse.soft160.library;
public class Book {
public String entry;
public String title;
public String subtitle;
}
package edu.unl.cse.soft160.library;
import java.util.ArrayList;
import java.util.List;
public class Library {
private List<Book>books;
public Library() {
books = new ArrayList<Book>();
}
public void add(Book book) {
books.add(book);
}
public void remove(Book book) {
books.remove(book);
}
public String toString() {
return String.valueOf(books);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment