{"id":21855553,"url":"https://github.com/monikakonieczna/java-code-challenge","last_synced_at":"2025-03-21T19:16:18.496Z","repository":{"id":61791586,"uuid":"555237724","full_name":"monikakonieczna/java-code-challenge","owner":"monikakonieczna","description":"Java challenges from the Learning Java course on LinkedIn Learning by Kathryn Hodge https://www.linkedin.com/learning/java-code-challenges ","archived":false,"fork":false,"pushed_at":"2022-10-26T14:49:22.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T14:07:28.922Z","etag":null,"topics":["code-challenges","java-practice"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monikakonieczna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-21T07:35:55.000Z","updated_at":"2023-02-23T07:42:20.000Z","dependencies_parsed_at":"2023-01-20T19:15:41.794Z","dependency_job_id":null,"html_url":"https://github.com/monikakonieczna/java-code-challenge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monikakonieczna%2Fjava-code-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monikakonieczna%2Fjava-code-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monikakonieczna%2Fjava-code-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monikakonieczna%2Fjava-code-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monikakonieczna","download_url":"https://codeload.github.com/monikakonieczna/java-code-challenge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244852683,"owners_count":20521160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-challenges","java-practice"],"created_at":"2024-11-28T02:16:18.958Z","updated_at":"2025-03-21T19:16:18.412Z","avatar_url":"https://github.com/monikakonieczna.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java-Code-Challenge\n### Challenge 1 - Even or odd\n\u003e Create a function that verifies if a number is even. \nIf the number is even, the function should return true. \nIf odd, the function should return false. \nThe input will always be an integer. Write unit tests - all should pass.\n- [x] Implementation\n- [x] Unit tests\n### Challenge 2 - Password complexity\n\u003e Create a function that verifies password complexity. \n\u003e In order for a password to be valid, it must have at least six characters, one upper case letter, \n\u003e one lowercase letter, and one number. The function will take a string as input and output a Boolean, \n\u003e representing whether the password is complex enough.\n- [x] Implementation\n- [x] Unit tests\n### Challenge 3 - Double or nothing\n\u003eA user will start off with 10 points and throughout the game, \n\u003e the user has the option to take a chance to double their points. \n\u003e Or, walk away with their current point value. \n\u003e If the user decides to gamble their points in the chance of doubling, \n\u003e the program should use randomness to decide whether the points get doubled or the user loses it all.\n- [x] Implementation\n- [ ] Unit tests\n### Challenge 4 - Calculate water bill\n\u003eCalculate the amount owed, given the water usage.\n\u003e It's time to calculate the water bill for your apartment. \n\u003e Your water bill consists of two parts. \n\u003e First, there is a minimum charge of $18.84. This includes 1,496 gallons of water, or two CCFs. One CCF is equal to 748 gallons. \n\u003e If you use more than the included two CCFs, you are charged an extra $3.90 per additional CCF. \n\u003e This means if you use 1800 gallons of water in a given month, you will be charged the minimum $18.84, \n\u003e as well as an additional $3.90 for the extra volume of water used. \n\u003e For simplicity, we're not including tax in these calculations.\n- [ ] Implementation\n- [ ] Unit tests\n### Challenge 5 - Model a person\n\u003e Write a Java class that represents a person. \n\u003e The Person class should have a first name, last name, and age attribute with their own getters and setters. \n\u003e It should also have functionality for the person to introduce themselves. \n\u003e Using the Person class, you will create several Person instances that introduce themselves.\n- [x] Implementation\n- [x] Unit tests\n### Challenge 6 - 100 days from now\n\u003e  Create a program that tells us what day it is 100 days from today.\n- [x] Implementation\n- [x] Unit tests\n### Challenge 7 - Student volunteers\n\u003e Each year every student must volunteer for at least two events. In this challenge, \n\u003e the school needs to find out which students still need to finish their volunteering. \n\u003e In starter code file, we have a list of students as well as a map that contains each \n\u003e event with the students that attended that event. \n\u003e Your job is to implement the find with incomplete events function.\n- [x] Implementation\n- [x] Unit tests\n### Challenge 8 - Letter points\n\u003eLet's play a word game. Each letter in a word is worth a certain number of points. \n\u003e To calculate the score for a word, you add up the points of each letter, the bigger the score, the better. \n\u003e For this challenge you will create an algorithm that calculates the score for a given word. \n\u003e In the exercise files, we have a map called letter points that contains mappings from each valid letter \n\u003e to an associated point value. If a given character is not in the map, it gets zero points. \n- [ ] Implementation\n- [ ] Unit tests\n### Challenge 9 - End-of-the-year sale\n\u003e Let's say you work at a retail store. \n\u003e There's a sale and items are marked off at different rates. \n\u003e In this challenge, can you identify the least expensive item in a collection? \n\u003e It's the end-of-year sale and items in the store are marked off at varying rates. \n\u003e Each store item has a name, retail price and discount. \n\u003e As a part of this challenge, you'll model the store item objects using Java. \n\u003e Then you'll create an algorithm that calculates the least expensive store item in a collection of items.\n- [ ] Implementation\n- [ ] Unit tests\n### Challenge 10 - Investing change\n\u003eYou want to start investing, so you decide for every purchase, you'll invest the change. \n\u003e In this challenge, your job is to figure out the average amount invested per purchase. \n\u003e This month, you decided to invest the leftover change from each purchase into the stock market. \n\u003e For example, when you purchase your $5.20 coffee, you put 73 cents into your investment account. \n\u003e Given a list of each purchase made, your challenge is to create a function that returns the average amount \n\u003e you invested in the stock market. To start you off, we have a main class that has a list of purchases. \n\u003e We could create a class to represent a given purchase and make a more elaborate object but to keep things simple, \n\u003e we'll use a double to represent the cost of each purchase. Your job is to implement calculate average change invested.\n- [ ] Implementation\n- [ ] Unit tests\n### Challenge 11 - Elevator algorithm\n\u003eAn elevator can move up and down visiting floors to pick people up and drop people off along the way. \n\u003e Think you can simulate an elevator? \n\u003e Most of the time in software development, you won't be creating the program from scratch. \n\u003e So in this challenge, you'll be tasked to implement a few functions to simulate an elevator. \n\u003e Let's take a look Here we have our elevator class that keeps track of the current floor and the elevator direction. \n\u003e Remember, when an elevator starts going up, it continues to go up until there are no drop-off or pickup requests \n\u003e in that direction. Our program also keeps track of the people waiting with the request paths map. \n\u003e These are the requested paths that people are waiting to take. \n\u003e The key is the starting floor and the value is all the destination floors requested from that starting floor. \n\u003e Once the people at a given floor have boarded the elevator, the current destinations array keeps track of the \n\u003e floors the elevator will visit by setting the value at the appropriate index to true. \n\u003e Your job is to implement the process floor, call elevator and move elevator functions. \n\u003e We also have a main function that provides an easy way to manually test your elevator implementation.\n- [ ] Implementation\n- [ ] Unit tests\n### Challenge 12 - Determine the winner\n\u003e It's the holidays, your family's in town and you just played a few rounds of a guessing game. \n\u003e Can you write a program that identifies the winner and also prints out the final scores in order? \n\u003e The game had a series of rounds and during each round, \n\u003e a given player and their partner got a series of points. \n\u003e Given the team results from each round, your challenge is to write a program that automatically \n\u003e determines the overall winner and prints out the final score results in descending order. \n\u003e We start you off with a bit of sample code with the team class for representing each team \n\u003e as well as the main class for running your program. \n\u003e We also have a utility function in team utils that generates and sets some sample round scores for each team. \n\u003e Your challenge is to implement the reveal results function so that it prints out the winner as well as the rest \n\u003e of the game results in descending order.\n- [ ] Implementation\n- [ ] Unit tests\n### Challenge 13 - Joke generator\n\u003eMany developers extend their program's functionality by calling APIs. \n\u003e So in this challenge, you'll use an API to tell some jokes with Java.\n\u003e In order to create more complex applications, many developers extend their \n\u003e programs functionality by calling APIs. An API is an application programming interface \n\u003e and it allows you to access and manipulate data from external programs created by other developers. \n\u003e In this challenge you'll create a joke generator. You should use a joke generator API to come up with the jokes. \n\u003e Your program should call this API and display the joke to the user.\n- [ ] Implementation\n- [ ] Unit tests\n### Challenge 14 - Redact a secret message\n\u003eYou have to send a secret text file to a fellow employee but they don't have the same security clearance as you. \n\u003e So in this challenge, you'll write a program that redacts a list of words from a given text file. \n\u003e The program should read in the original file and create a new file with the same contents. \n\u003e But the redacted words should be overwritten with the word redacted in all uppercase.\n- [ ] Implementation\n- [ ] Unit tests\n### Challenge 15 - Parse a CSV file\n\u003e It's Friday night and there's a concert downtown. \n\u003e Before they let anyone in, security needs to make sure each person reserved a ticket in advance. \n\u003e Let's help them out with this challenge. \n\u003e Security has a CSV file with each ticket holder name along with the number of tickets they bought. \n\u003e Your challenge is to create a program that imports the CSV and checks if a given person bought a ticket, \n\u003e as well as how many tickets they bought. If the person is not on the list or they did not buy enough \n\u003e tickets for their whole party, they should not be let in.\n- [ ] Implementation\n- [ ] Unit tests","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonikakonieczna%2Fjava-code-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonikakonieczna%2Fjava-code-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonikakonieczna%2Fjava-code-challenge/lists"}