Skip to content

ryankerbyIT/JavaClassFundamentals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Fundamentals Project

Project Overview

This repository contains several Java classes that were created as part of a Java fundamentals course. These classes cover the basic concepts of object-oriented programming, including constructors, fields, accessor and mutator methods, and more. Each class demonstrates a specific concept and can be used to understand the fundamentals of Java programming.

Table of Contents

  1. Employee Class
  2. Car Class
  3. Personal Information Class
  4. RetailItem Class
  5. Payroll Class
  6. TestScores Class
  7. Circle Class
  8. Temperature Class
  9. MonthDays Class
  10. Game of Twenty-One
  11. Freezing and Boiling Points Class
  12. SavingsAccount Class
  13. Deposit and Withdrawal Files
  14. Patient Charges Class
  15. Dice Game
  16. Roulette Wheel Colors Class
  17. Coin Toss Simulator
  18. Tossing Coins for a Dollar
  19. Fishing Game Simulation

The following classes are included in this project:

1. Employee Class

  • Contains fields for employee's name, ID number, department, and position.
  • Includes constructors and accessor/mutator methods.
  • Demonstrates storing and displaying employee data.

2. Car Class

  • Contains fields for the car's year model, make, and speed.
  • Includes methods for accelerating and braking.
  • Demonstrates how to modify an object's state through method calls.

3. Personal Information Class

  • Stores personal data such as name, address, age, and phone number.
  • Demonstrates how to create instances to represent personal data.

4. RetailItem Class

  • Contains fields for description, units on hand, and price of an item.
  • Demonstrates the use of constructors and methods to interact with retail item data.

5. Payroll Class

  • Contains fields for an employee’s name, ID number, hourly pay rate, and hours worked.
  • Includes methods to calculate gross pay.

6. TestScores Class

  • Stores three test scores.
  • Demonstrates how to calculate and return the average score.

7. Circle Class

  • Fields include the radius of the circle and a constant for PI.
  • Methods for calculating area, diameter, and circumference.

8. Temperature Class

  • Stores a temperature in Fahrenheit.
  • Methods for converting and retrieving temperature in Celsius and Kelvin.

9. MonthDays Class

  • Determines the number of days in a month, considering leap years.
  • Contains logic to check for leap years.

10. Game of Twenty-One

  • A game where the user tries to beat the computer’s hidden total without going over 21 using dice rolls.

11. Freezing and Boiling Points Class

  • Stores a temperature and compares it to the freezing/boiling points of ethyl alcohol, oxygen, and water.
  • Methods to check whether the stored temperature is below the freezing or above the boiling points of the substances.

12. SavingsAccount Class

  • Stores a savings account’s annual interest rate and balance.
  • Methods for withdrawing, depositing, and calculating monthly interest.

13. Deposit and Withdrawal Files

  • Reads deposit and withdrawal data from text files and updates the balance in a SavingsAccount object.

14. Patient Charges Class

  • Stores information about a patient and procedures performed, including charges.
  • Demonstrates the use of multiple classes to store related data.

15. Dice Game

  • Simulates a dice game where the user plays against the computer.

16. Roulette Wheel Colors Class

  • Simulates a roulette wheel, determining the color of a pocket based on its number.

17. Coin Toss Simulator

  • Simulates the tossing of a coin and tracks the number of heads and tails results.

18. Tossing Coins for a Dollar

  • A game simulation using coins where the goal is to reach exactly one dollar.

19. Fishing Game Simulation

  • Simulates a fishing game using a die roll to determine the items caught, each worth a different number of points.

How to Run the Project

  1. Clone this repository to your local machine using:
    git clone https://github.com/ryankerbyIT/JavaClassFundamentals.git
    
    
    

Instructions to Add to GitHub:

  1. Create a README.md file in your project directory (use the command echo "# Project Title" > README.md if it doesn't already exist).
  2. Copy the above content and paste it into your README.md file.
  3. Commit the changes and push them to your GitHub repository:
    git add README.md
    git commit -m "Added README.md"
    git push origin main

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages