Comments and added some code to the codebase
This commit is contained in:
nicoagostini committed 2025-10-27 14:57:29 -07:00
commit 3730111bab
7 files changed
+29 -29

No files matched your search

+4 -4
View File
@@ -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,
@@ -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,
@@ -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
+4 -4
View File
@@ -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
+2 -2
View File
@@ -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)
{
+5 -5
View File
@@ -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) {
@@ -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,