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.
- Employee Class
- Car Class
- Personal Information Class
- RetailItem Class
- Payroll Class
- TestScores Class
- Circle Class
- Temperature Class
- MonthDays Class
- Game of Twenty-One
- Freezing and Boiling Points Class
- SavingsAccount Class
- Deposit and Withdrawal Files
- Patient Charges Class
- Dice Game
- Roulette Wheel Colors Class
- Coin Toss Simulator
- Tossing Coins for a Dollar
- Fishing Game Simulation
The following classes are included in this project:
- Contains fields for employee's name, ID number, department, and position.
- Includes constructors and accessor/mutator methods.
- Demonstrates storing and displaying employee data.
- 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.
- Stores personal data such as name, address, age, and phone number.
- Demonstrates how to create instances to represent personal data.
- 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.
- Contains fields for an employee’s name, ID number, hourly pay rate, and hours worked.
- Includes methods to calculate gross pay.
- Stores three test scores.
- Demonstrates how to calculate and return the average score.
- Fields include the radius of the circle and a constant for PI.
- Methods for calculating area, diameter, and circumference.
- Stores a temperature in Fahrenheit.
- Methods for converting and retrieving temperature in Celsius and Kelvin.
- Determines the number of days in a month, considering leap years.
- Contains logic to check for leap years.
- A game where the user tries to beat the computer’s hidden total without going over 21 using dice rolls.
- 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.
- Stores a savings account’s annual interest rate and balance.
- Methods for withdrawing, depositing, and calculating monthly interest.
- Reads deposit and withdrawal data from text files and updates the balance in a SavingsAccount object.
- Stores information about a patient and procedures performed, including charges.
- Demonstrates the use of multiple classes to store related data.
- Simulates a dice game where the user plays against the computer.
- Simulates a roulette wheel, determining the color of a pocket based on its number.
- Simulates the tossing of a coin and tracks the number of heads and tails results.
- A game simulation using coins where the goal is to reach exactly one dollar.
- Simulates a fishing game using a die roll to determine the items caught, each worth a different number of points.
- Clone this repository to your local machine using:
git clone https://github.com/ryankerbyIT/JavaClassFundamentals.git
- Create a
README.md
file in your project directory (use the commandecho "# Project Title" > README.md
if it doesn't already exist). - Copy the above content and paste it into your
README.md
file. - Commit the changes and push them to your GitHub repository:
git add README.md git commit -m "Added README.md" git push origin main