Skip to content

omen-core/Classes-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This project has two Java files: Pet.java and Main.java.

-Pet.java

Defines a Pet with:

name

species

age

hunger

It includes methods to:

play (hunger goes up)

feed (hunger goes down but never below 0)

birthday (age goes up)

get each field

return a description with toString()

-Main.java

Creates two Pet objects (Apollo the dog and Stella the cat) and prints a short story describing their stats and what happens when they play, eat, and have a birthday.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages