Skip to content

rin-star/APCSAsemester1Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokémon Virtual Pet Simulation Project

This program models interactive Pokémon companions using Java classes. The project demonstrates core object-oriented programming principles such as encapsulation, composition, constructors, method overloading, and dynamic behaviors.

The Pokémon Virtual Pet Simulation allows users to adopt Pokémon, feed them, train them, evolve them, and monitor their happiness, energy, and unique type-based responses. Each Pokémon species behaves differently depending on its typing, environment, and user interactions.


Project Structure

  • src: contains the Java source files (shinx.java, cleffa.java, riolu.java, litwick.java, main.java)
  • lib: contains any dependencies if added
  • bin: the folder where compiled .class files are generated by default

If you want to customize the folder structure, open .vscode/settings.json and update the related settings there.


Classes Overview

  • Flowchart
    Please check this flowchart for more detailed information.

main.java

Represents the main class for the Pokémon simulation. This class serves as the entry point for the program and manages the overall flow of the simulation.

Includes:

  • User interface for adopting, feeding, training, and evolving Pokémon.
  • Tracks and updates Pokémon stats (happiness, energy, etc.).
  • Handles user input and displays menus.

shinx.java

Represents the Electric-type Pokémon, Shinx. This class models Shinx's unique behaviors and stats.

Includes:

  • Methods for feeding, training, and evolving Shinx.
  • Tracks happiness and energy levels.
  • Implements type-specific responses to user actions.

cleffa.java

Represents the Fairy-type Pokémon, Cleffa. This class models Cleffa's unique behaviors and stats.

Includes:

  • Methods for feeding, training, and evolving Cleffa.
  • Tracks happiness and energy levels.
  • Implements type-specific responses to user actions.

riolu.java

Represents the Fighting-type Pokémon, Riolu. This class models Riolu's unique behaviors and stats.

Includes:

  • Methods for feeding, training, and evolving Riolu.
  • Tracks happiness and energy levels.
  • Implements type-specific responses to user actions.

litwick.java

Represents the Ghost/Fire-type Pokémon, Litwick. This class models Litwick's unique behaviors and stats.

Includes:

  • Methods for feeding, training, and evolving Litwick.
  • Tracks happiness and energy levels.
  • Implements type-specific responses to user actions.

How to Run

  1. Open the project folder in Visual Studio Code.
  2. Compile the Java files:
    javac -d bin src/*.java
  3. Run the tester class:
    java -cp bin BirdTester

Bugs & Future Improvements

Some actions, like feeding candy when none is available, may cause unexpected behavior. Future updates could include inventory checks, a Graphical User Interface, save/load features, and a more advanced battle system.


Example Output

Which pokemon do you want? (shinx, cleffa, litwick, riolu): shinx
You created a pokemon!

1. Show stats
2. Feed
3. Play
4. Give Bath
5. Heal
6. Evolve
7. Fight Trainer
8. Feed Candy
9. Rest
0. Exit
1
Evolution: Shinx
Health: 100
Happiness: 0
Energy: 50
Hunger: 20

Learning Objectives

  • Write and call constructors, including overloaded constructors.
  • Write methods with parameters and return values.
  • Write and use custom classes in Java.

Dependency Management

The JAVA PROJECTS view in Visual Studio Code allows you to manage dependencies. More details can be found in the VS Code Java Dependency Guide.

Contributors

  • Jacob Le (Technical Writer)
  • Ashlynn Kirchoff (Project Manager)
  • Natalee Ngo (Quality Assurance Tester)
  • Rin Ryu (Programming Lead)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages