From 842ffeb2024fc15854fbacaa54b77c1556f1c1e2 Mon Sep 17 00:00:00 2001 From: SowinskiBraeden Date: Mon, 27 Oct 2025 14:54:58 -0700 Subject: [PATCH] update comments --- src/code/ca/bcit/comp2522/lab04/Author.java | 8 ++++---- src/code/ca/bcit/comp2522/lab04/Autobiography.java | 6 +++--- src/code/ca/bcit/comp2522/lab04/Biography.java | 10 +++++----- src/code/ca/bcit/comp2522/lab04/Book.java | 8 ++++---- src/code/ca/bcit/comp2522/lab04/Name.java | 4 ++-- src/code/ca/bcit/comp2522/lab04/Person.java | 10 +++++----- src/code/ca/bcit/comp2522/lab04/Validator.java | 12 ++++++------ 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/code/ca/bcit/comp2522/lab04/Author.java b/src/code/ca/bcit/comp2522/lab04/Author.java index 3239806..6624713 100644 --- a/src/code/ca/bcit/comp2522/lab04/Author.java +++ b/src/code/ca/bcit/comp2522/lab04/Author.java @@ -20,10 +20,10 @@ public class Author /** * Author constructor - * @param name of the author - * @param dateOfBirth of the author - * @param dateOfDeath of author if they did die (can be null) - * @param genre that the author writes in + * @param name Name of the author + * @param dateOfBirth Date of birth of the author + * @param dateOfDeath Date of death of author if they did die (can be null) + * @param genre String representing the genre that the author writes in */ public Author( final Name name, diff --git a/src/code/ca/bcit/comp2522/lab04/Autobiography.java b/src/code/ca/bcit/comp2522/lab04/Autobiography.java index f4638b9..2952804 100644 --- a/src/code/ca/bcit/comp2522/lab04/Autobiography.java +++ b/src/code/ca/bcit/comp2522/lab04/Autobiography.java @@ -16,9 +16,9 @@ public class Autobiography { /** * Autobiography constructor - * @param title of autobiography - * @param year published - * @param author and subject of autobiography + * @param title String title of autobiography + * @param year int year Autobiography was published + * @param author Author and subject of autobiography */ public Autobiography( final String title, diff --git a/src/code/ca/bcit/comp2522/lab04/Biography.java b/src/code/ca/bcit/comp2522/lab04/Biography.java index fba19ec..c0c7c0a 100644 --- a/src/code/ca/bcit/comp2522/lab04/Biography.java +++ b/src/code/ca/bcit/comp2522/lab04/Biography.java @@ -18,10 +18,10 @@ public class Biography /** * Biography constructor - * @param title of Biography - * @param year published - * @param author of Biography - * @param subject that the Biography is about + * @param title String title of Biography + * @param year int Year Biography was published + * @param author Author of the Biography + * @param subject Person that the Biography is about */ public Biography( final String title, @@ -38,7 +38,7 @@ public class Biography /** * equals checks if a given object is equal to this object - * @param o the reference object with which to compare. + * @param o Object to check if it is equal to this. * @return if the given object is equal */ @Override diff --git a/src/code/ca/bcit/comp2522/lab04/Book.java b/src/code/ca/bcit/comp2522/lab04/Book.java index 6556934..ff934f8 100644 --- a/src/code/ca/bcit/comp2522/lab04/Book.java +++ b/src/code/ca/bcit/comp2522/lab04/Book.java @@ -27,9 +27,9 @@ public class Book /** * Book constructor - * @param title of the book - * @param year the book was published - * @param author of the book + * @param title String title of the book + * @param year int year the book was published + * @param author Author of the book */ public Book( final String title, @@ -83,7 +83,7 @@ public class Book /** * compareTo another book, books are equal if they are written in the same * year - * @param other book to compare to + * @param other Book to compare to * @return if the given book is older, newer or same age as this book */ @Override diff --git a/src/code/ca/bcit/comp2522/lab04/Name.java b/src/code/ca/bcit/comp2522/lab04/Name.java index 39c4ed6..ff87b5d 100644 --- a/src/code/ca/bcit/comp2522/lab04/Name.java +++ b/src/code/ca/bcit/comp2522/lab04/Name.java @@ -20,8 +20,8 @@ public class Name /** * Name constructor - * @param first name to save - * @param last name to save + * @param first name of the person + * @param last name of the person */ public Name(final String first, final String last) { diff --git a/src/code/ca/bcit/comp2522/lab04/Person.java b/src/code/ca/bcit/comp2522/lab04/Person.java index 18ce5e0..4960f88 100644 --- a/src/code/ca/bcit/comp2522/lab04/Person.java +++ b/src/code/ca/bcit/comp2522/lab04/Person.java @@ -24,9 +24,9 @@ public class Person /** * Person construct - * @param dateOfBirth of person, cannot be null - * @param dateOfDeath of person, can be null - * @param name of person + * @param dateOfBirth Date of birth of person, cannot be null + * @param dateOfDeath Date of death of person, can be null + * @param name name of the person */ public Person( final Date dateOfBirth, @@ -94,7 +94,7 @@ public class Person /** * compareTo another person based on date of birth - * @param other person to compare + * @param other Person to compare to * @return if a person is older, younger or same age */ @Override @@ -104,7 +104,7 @@ public class Person /** * equals checks if another given object is equal to this object - * @param o the reference object with which to compare. + * @param o Object to check if equal to this * @return if given object are equals */ public boolean equals(final Object o) { diff --git a/src/code/ca/bcit/comp2522/lab04/Validator.java b/src/code/ca/bcit/comp2522/lab04/Validator.java index b4f762c..7577c4d 100644 --- a/src/code/ca/bcit/comp2522/lab04/Validator.java +++ b/src/code/ca/bcit/comp2522/lab04/Validator.java @@ -16,8 +16,8 @@ public final class Validator /** * validateString ensures a string is not empty, blank, * null or greater than maxLength - * @param string to validate - * @param maxLength that string can be + * @param string String to validate + * @param maxLength int max length that string can be */ public static void validateString(final String string, final int maxLength) { if (string == null || string.isEmpty()) { @@ -31,7 +31,7 @@ public final class Validator /** * validateObject ensures a given object is not null - * @param object to ensure is not null + * @param object Object to ensure is not null * @param objectName variable name of object for log */ public static void validateObject( @@ -46,9 +46,9 @@ public final class Validator /** * validateInteger ensures a given number is within * the correct provided range - * @param number to validate - * @param min of range inclusive - * @param max of range inclusive + * @param number int to validate + * @param min minimum int of range inclusive + * @param max maximum int of range inclusive */ public static void validateInteger( final int number,