https://github.com/kgniewek/javapractiseproject
Java practice project featuring sorting, character manipulation, and list operations. Utilizes Java Collections Framework and Comparator Interface for custom sorting of Employee objects. Includes functionality for list manipulation, unique character counting, and employee sorting.
https://github.com/kgniewek/javapractiseproject
2021 comparator java java-collections-framework
Last synced: 11 months ago
JSON representation
Java practice project featuring sorting, character manipulation, and list operations. Utilizes Java Collections Framework and Comparator Interface for custom sorting of Employee objects. Includes functionality for list manipulation, unique character counting, and employee sorting.
- Host: GitHub
- URL: https://github.com/kgniewek/javapractiseproject
- Owner: kgniewek
- Created: 2024-04-24T13:59:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-26T13:28:19.000Z (about 2 years ago)
- Last Synced: 2025-03-18T11:32:45.289Z (about 1 year ago)
- Topics: 2021, comparator, java, java-collections-framework
- Language: Java
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java Practice Project
This Java project is a small practice project that consists of several Java classes which perform various tasks including sorting, character manipulation, and list operations. The project showcases fundamental Java programming concepts such as class creation, method implementation, and collections handling.
### Technologies / Tools Used
- **Java**: The core programming language used.
- **Java Collections Framework**: Utilized for data manipulation and management.
- **Comparator Interface**: Used for custom sorting of Employee objects based on job titles and surnames.
### Features
The project includes several key functionalities:
1. **List Manipulation**:
- Creation of a list to store favorite computer game titles.
- Checking if a given title is in the list.
- Sorting the list in reverse alphabetical order and printing the sorted list.
2. **Unique Character Counting**:
- Reading a string from the user and displaying the total number of characters and the number of unique characters.
3. **Employee Sorting**:
- Creating a list of Employee objects.
- Sorting the list using a custom comparator based on job titles and then by surname.
### Running the Project
To run this project, ensure you have Java installed on your system. Navigate to the project directory and compile the code using `javac`, then run the compiled classes with `java`. For example:
### Project Structure
- `src/`
- `Clasess/`
- `CharactersHelper.java`: Contains methods for counting unique characters and printing string information.
- `Employee.java`: Defines an Employee class with properties for name, surname, and job.
- `EmployeeComparator.java`: Implements a Comparator for sorting Employee objects.
- `com/company/`
- `Main.java`: Contains the main method and drives the functionality of the other classes through various tasks.