Before you start
Check these off so you’re ready to build.
Create a new Git repository
- 1
Create a new project folder for your OOP character demo.
- 2
Open the folder in VS Code.
- 3
Initialize a new local Git repository.
Prepare the project files
- 1
Create an
index.htmlfile and a separate JavaScript file. - 2
Add a clear title and an output area where the character information and actions will appear.
- 3
Connect the JavaScript file to the page.
Open the page in a browser and confirm there are no missing-file errors.
Create a base class and objects
- 1
Create a base character class with a constructor and at least two properties.
- 2
Add at least one method that describes or performs a character action.
- 3
Create at least two objects from your class with different values.
- 4
Show the objects’ information or method results on the web page.
Explain which part is the class blueprint and which values are the objects.
Demonstrate the four OOP pillars
- 1
Create at least one subclass that inherits from the base class.
- 2
Use the parent constructor when initializing the subclass.
- 3
Override a shared method so the subclass performs the same action differently.
- 4
Protect at least one piece of character data and provide a controlled way to read or change it.
- 5
Display the different object behaviors clearly on the page.
Point to one working example each of classes and objects, inheritance, polymorphism, and encapsulation.
Test and explain your program
- 1
Run every method and confirm each object keeps its own data.
- 2
Confirm the subclass inherits shared behavior and its overridden method behaves differently.
- 3
Confirm protected data cannot be changed directly from outside the class.
- 4
Open the browser console and resolve any errors.
The page shows correct output and the browser console has no red errors.
Commit and push to GitHub
- 1
Stage your project files and create a clear commit.
- 2
Create a new public repository under your own GitHub account.
- 3
Connect the local repository to the GitHub repository and push your main branch.
- 4
Confirm your project files appear on GitHub.
Deploy to GitHub Pages
- 1
Open the Pages section in your repository settings.
- 2
Deploy from the main branch and root folder.
- 3
Wait for GitHub to publish the site, then open the live URL.
- 4
Confirm the deployed page displays the same character data and behaviors.
The submitted live URL must load your working OOP demonstration.
Done checklist
Tick everything before you submit.
Submit
Turn in both URLs. Be ready to identify where each OOP pillar appears.
- Repository
- Your GitHub repository URL
- Live page
- Your GitHub Pages URL
Need to review the four pillars? Open the PF 101 study hub.