Skip to content

Stuycs-K/lab11-stuyrim-3-benitezl-conningn

 
 

Repository files navigation

Review Assignment Due Date

APCS - Stuyrim

Class Documentation

CodeNerd

Represents a student with coding expertise. Extends Adventurer.

Attributes

  • happiness: Current happiness level.
  • happinessMax: Maximum happiness.
  • GPA: Academic performance (0-100).
  • homework: List of homework assignments.
  • preferredLanguage: Programming language preference.

Constructor

CodeNerd(String name, int hp, String language)

Initializes a CodeNerd with a name, health points, and preferred programming language.

Methods

  • int getGPA(): Returns the current GPA.
  • void setGPA(int GPA): Sets the GPA.
  • String getHomeworkSummary(): Summarizes homework assignments.
  • String doHomework(int index): Completes a homework assignment and adjusts GPA.
  • String getSpecialName(): Returns "Happiness".
  • int getSpecial(): Returns current happiness level.
  • void setSpecial(int n): Updates happiness level.
  • int getSpecialMax(): Returns maximum happiness level.
  • String attack(Adventurer other): Attacks an opponent.
  • String support(Adventurer other): Supports another adventurer.
  • String support(): Restores own happiness and health.
  • String specialAttack(Adventurer other): Performs a special attack.

Dean

Represents a school dean. Extends Adventurer.

Attributes

  • happiness: Current happiness level.
  • happinessMax: Maximum happiness.

Constructor

Dean(String name, int hp)

Initializes a Dean with a name and health points.

Methods

  • String getSpecialName(): Returns "Steal Your Airpods".
  • int getSpecial(): Returns current happiness level.
  • void setSpecial(int n): Updates happiness level.
  • int getSpecialMax(): Returns maximum happiness level.
  • String attack(Adventurer other): Attacks an opponent.
  • String support(Adventurer other): Supports another adventurer.
  • String support(): Restores own happiness and health.
  • String specialAttack(Adventurer other): Performs a special attack.

HW

Represents a homework assignment.

Attributes

  • type: Type of homework (e.g., Math, Coding, History).
  • duration: Time required to complete.

Constructor

HW(String type, int duration)

Creates a homework assignment. Throws an exception for invalid types.

Methods

  • String getType(): Returns the homework type.
  • int getDuration(): Returns the homework duration.
  • void changeDuration(int n): Updates the duration.

MathNerd

Represents a student with math expertise. Extends Adventurer.

Attributes

  • happiness: Current happiness level.
  • happinessMax: Maximum happiness.
  • GPA: Academic performance (0-100).
  • homework: List of homework assignments.

Constructor

MathNerd(String name, int hp)

Initializes a MathNerd with a name and health points.

Methods

  • Inherits most methods from CodeNerd.
  • String getSpecialName(): Returns "Extra Credit".

HistoryNerd

Represents a student with history expertise. Extends Adventurer.

Attributes

  • happiness: Current happiness level.
  • happinessMax: Maximum happiness.
  • GPA: Academic performance (0-100).
  • homework: List of homework assignments.

Constructor

HistoryNerd(String name, int hp)

Initializes a HistoryNerd with a name and health points.

Methods

  • Inherits most methods from CodeNerd.
  • String getSpecialName(): Returns "National History Day Project".

Teacher

Represents a teacher character. Extends Adventurer.

Attributes

  • happiness: Current happiness level.
  • happinessMax: Maximum happiness.

Constructor

Teacher(String name, int hp)

Initializes a Teacher with a name and health points.

Methods

  • String getSpecialName(): Returns "Teaching Power".
  • int getSpecial(): Returns current happiness level.
  • void setSpecial(int n): Updates happiness level.
  • int getSpecialMax(): Returns maximum happiness level.
  • String attack(Adventurer other): Attacks an opponent.
  • String support(Adventurer other): Supports another adventurer.
  • String support(): Restores own happiness and health.
  • String specialAttack(Adventurer other): Performs a special attack.

About

2025-apcs1-lab11-stuyrim-APCS-Stuyrim-Template-1 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%