From f334d0e783406f1ff884e95c39062c1bc4d34aa4 Mon Sep 17 00:00:00 2001 From: Derek Dobbs <91964686+derek-dobbs@users.noreply.github.com> Date: Wed, 12 Jan 2022 11:14:13 -0600 Subject: [PATCH 1/2] Added annotations --- src/Author.java | 2 +- src/Main.java | 1 + src/Person.java | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Author.java b/src/Author.java index 2057127..b423792 100644 --- a/src/Author.java +++ b/src/Author.java @@ -3,7 +3,7 @@ */ import java.util.ArrayList; import java.util.List; - +@SuppressWarnings("all") public class Author extends Person { private List books; diff --git a/src/Main.java b/src/Main.java index 08139ff..38bfc8f 100644 --- a/src/Main.java +++ b/src/Main.java @@ -1,3 +1,4 @@ +@SuppressWarnings("all") public class Main { public static void main(String[] args) { Author author = new Author("Sandi", "Metz"); diff --git a/src/Person.java b/src/Person.java index e09b8b3..bfc3446 100644 --- a/src/Person.java +++ b/src/Person.java @@ -1,6 +1,7 @@ /** * This source file is subject to the license that is bundled with this package in the file LICENSE. */ +@SuppressWarnings("all") public class Person { protected String firstName; protected String lastName; From 1b4e5299757f74aac823348aaabcbf219210da50 Mon Sep 17 00:00:00 2001 From: Derek Dobbs <91964686+derek-dobbs@users.noreply.github.com> Date: Thu, 13 Jan 2022 09:55:18 -0600 Subject: [PATCH 2/2] Updated exercise --- src/Author.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Author.java b/src/Author.java index ff773fe..258e00a 100644 --- a/src/Author.java +++ b/src/Author.java @@ -31,7 +31,7 @@ public void addBook(String book) { books.add(book); } - @Override + public String fullName() { return String.format("%s, %s", lastName, firstName); }