Class AuthorData

java.lang.Object
com.miniproject.two.AuthorData
All Implemented Interfaces:
DataInterface

public class AuthorData extends Object implements DataInterface
This class represents the author data. It contains the author's name and nationality.
  • Constructor Details

    • AuthorData

      public AuthorData(String author, String nationality)
      Constructs an AuthorData object with the given author and nationality.
      Parameters:
      author - the author's name
      nationality - the author's nationality
  • Method Details

    • getAuthor

      public String getAuthor()
      Returns the author's name.
      Returns:
      the author's name
    • getNationality

      public String getNationality()
      Returns the author's nationality.
      Returns:
      the author's nationality
    • setAuthor

      public void setAuthor(String author)
      Sets the author of the author data.
      Parameters:
      author - the author's name
    • setNationality

      public void setNationality(String nationality)
      Sets the nationality of the object.
      Parameters:
      nationality - the new nationality to set
    • printData

      public void printData()
      Prints the data of the implementing class. This method is meant to output the data in a specific format such as a table. The exact format and contents depend on the implementing class.
      Specified by:
      printData in interface DataInterface
    • printHeader

      public void printHeader()
      Prints the header for the data structure. This method is intended to print the header section, which usually consists of column names or other relevant headings. The format of the header is determined by the implementing class.
      Specified by:
      printHeader in interface DataInterface
    • printRow

      public void printRow()
      Prints a row of data. This method is responsible for printing a single row of data. The contents and formatting of the row depend on the implementing class.
      Specified by:
      printRow in interface DataInterface
    • printFooter

      public void printFooter()
      Prints the footer for the data structure. This method is intended to print the footer section, which could include summary information or any other relevant details. The format of the footer is determined by the implementing class.
      Specified by:
      printFooter in interface DataInterface