{"id":24021146,"url":"https://github.com/zipcodecore/refactored-train","last_synced_at":"2025-06-11T14:33:55.664Z","repository":{"id":49615809,"uuid":"517800572","full_name":"ZipCodeCore/refactored-train","owner":"ZipCodeCore","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-25T19:48:39.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-08T12:41:24.311Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ZipCodeCore.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-07-25T19:48:38.000Z","updated_at":"2022-07-25T19:49:03.000Z","dependencies_parsed_at":"2022-09-19T22:51:43.921Z","dependency_job_id":null,"html_url":"https://github.com/ZipCodeCore/refactored-train","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2Frefactored-train","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2Frefactored-train/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2Frefactored-train/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2Frefactored-train/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZipCodeCore","download_url":"https://codeload.github.com/ZipCodeCore/refactored-train/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240766672,"owners_count":19854114,"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":[],"created_at":"2025-01-08T12:39:27.503Z","updated_at":"2025-02-25T23:46:57.306Z","avatar_url":"https://github.com/ZipCodeCore.png","language":"Java","readme":"# Quiz 3\n\n## Overview\n* This quiz has 5 sections.\n\t1. fundamentals\n\t\t* `VowelUtils`\n\t\t* `StringUtils`\n\t\t* `PigLatinGenerator` - Difficult\n\t2. arrays\n\t\t* `SquareArrayAnalyzer`\n\t\t* `TicTacToe`\n\t\t* `WaveGenerator` - Difficult\n\t3. object orientation\n\t\t* `LabStatus`\n\t\t* `RockPaperScissors`\n\t4. collections\n\t\t* `Lab`\n\t\t* `Student`\n\t5. generics\n\t\t* `ArrayUtility` - Difficult\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003chr\u003e\n\u003chr\u003e\n\n## Section 1 - Fundamentals\n\n### VowelUtils\n* **Description**\n\t* The purpose of this class is to create utility methods to be used to assist in the completion of `PigLatinGenerator`.\n* **Methods to Complete**\n\t* `Boolean hasVowels(String word)`\n\t\t* return `true` if `word` contains `a`, `e`, `i`, `o`, or `u`.\n\t* `Boolean isVowel(Character character)`\n\t\t* return `true` if `character` is `a`, `e`, `i`, `o`, or `u`\n\t* `Integer getIndexOfFirstVowel(String word)`\n\t\t* return the index of the first vowel occurring in `word`\n\t* `Boolean startsWithVowel(String word)`\n\t\t* return `true` if first character of `word` is a vowel\n\n\n### StringUtils\n* **Description**\n\t* The purpose of this class is to create utility methods to be used to assist in the completion of `WaveGenerator`.\n* **Methods to Complete**\n\t* `String capitalizeNthCharacter(String str, Integer indexToCapitalize)`\n\t\t* return `str` with the character at `indexToCapitalize` capitalized\n\t* `Boolean isCharacterAtIndex(String baseString, Character characterToCheckFor, Integer indexOfString)`\n\t\t* return `true` if `baseString` has `characterToChexFor` at index of `indexOfString`.\n\t* `String[] getAllSubStrings(String string)`\n\t\t* return the _powerset_ of characters of `string`\n\t* `Integer getNumberOfSubStrings(String input)`\n\t\t* return the number of all substrings in `input`\n\n-\n### PigLatinGenerator\n* **Description**\n\t* Pig Latin is an English language game where the goal is to hide the meaning of a word from people not aware of the rules. \n\t* Given a `String` representative of a _word_, the rules are as follows:\n\t\t* If the word starts with a vowel, then return the original string with `\"way\"` appended.\n\t\t* If the word starts with a consonant, then shift consonants from the beginning of the word to the end of the word until the first vowel. Then, return the newly shifted string with `\"ay\"` appended.\n\t\t* If the word has no vowels, then return the original string plus \"ay\".\n\t\t* _Vowels_ are any of the following letters: `a`, `e`, `i`, `o`, `u`.\n\t\t* _Consonants_ are any letter, which aren't a vowel.\n\n\n#### Example\n* **Sample Program**\n\n```java\npublic static void main(String[] args) {\n\tPigLatinGenerator p = new PigLatinGenerator();\n\tSystem.out.println(p.translate(\"Map\"));\n\tSystem.out.println(p.translate(\"Apple\"));\n\tSystem.out.println(p.translate(\"Map Apple\"));\n\tSystem.out.println(p.translate(\"Psych\"));\n}\n```\n\n* **Output**\n\n```\napMay\nAppleway\napMay Appleway\nPsychay\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003chr\u003e\n\u003chr\u003e\n\n## Section 2 - Arrays\n\n\n### Square Array Checker\n* Given two arrays `a` and `b` write a method `compare(a, b)` that returns true if the two arrays have the \"same\" elements, with the same multiplicities. \"Same\" means, here, that the elements in `b` are the elements in `a` squared, regardless of the order.\n\n\n#### Example 1 - Valid Array \n```\na = [121, 144, 19, 161, 19, 144, 19, 11]  \nb = [121, 14641, 20736, 361, 25921, 361, 20736, 361]\n```\n* `compare(a, b)` returns true because in `b`\n\t* 121 is the square of 11,\n\t* 14641 is the square of 121,\n\t* 20736 the square of 144,\n\t* 361 the square of 19,\n\t* 25921 the square of 161,\nand so on.\n\n\n\n#### Example 2 - Invalid Array \n```\na = [121, 144, 19, 161, 19, 144, 19, 11]  \nb = [132, 14641, 20736, 361, 25921, 361, 20736, 361]\n```\n`compare(a,b)` returns `false` because in `b` 132 is not the square of any number of `a`.\n\n\n#### Example 3 - Invalid Array \n```\na = [121, 144, 19, 161, 19, 144, 19, 11]  \nb = [121, 14641, 20736, 36100, 25921, 361, 20736, 361]\n```\n\n`compare(a,b)` returns `false` because in `b` 36100 is not the square of any number of `a`.\n\n\n### TicTacToe\n* **Description**\n\t* The purpose of this class is to create a model of a `TicTacToe` board.\n\t* To be _homogenous_ means to be of a single type or value.\n* **Methods to Complete**\n\t* `String[] getRow(Integer rowInde)`\n\t\t* returns the array representative of the respective row index\n\t* `String[] getColumn(Integer columnIndex)`\n\t\t* returns the array representative of the respective column index\n\t* `Boolean isRowHomogenous(Integer rowIndex)`\n\t\t* returns true if the respective row contains 1 unique value.\n\t* `Boolean isColumnHomogeneous(Integer columnIndex)`\n\t\t* returns true if the respective row contains 1 unique value.\n\t* `String getWinner()`\n\t\t* return the `String` value of a _homogenous_ row, column, or diagnol\n\t* `String[][] getBoard()`\n\t\t* return the array representation of this `TicTacToe` board\n\n\n### WaveGenerator\n* **Description**\n\t* The purpose of this class is to create an array of near-identical `String`, whose array index corresponds to the index of the only capitalized character in the `String`\n* **Methods to Complete**\n\t* `String[] wave(String str)`\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003chr\u003e\n\u003chr\u003e\n\n## Section 3 - Object Orientation\n### RockPaperScissorsEvaluator\n\n\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/6/67/Rock-paper-scissors.svg/300px-Rock-paper-scissors.svg.png\" class=\"center\"\u003e\n\n* **Description**\n\t* Rock paper scissors is a hand game which allows a player to select 1 of 3 states: `ROCK`, `PAPER`, or `SCISSORS`.\n\t* A player who select `ROCK` will defeat a player who selects `SCISSORS`\n\t* A player who selects `PAPER` will defeat a player who select `ROCK`\n\t* A player who selects `SCISSORS` will defeat a player who selects `PAPER`\n\n\n#### ROCK\n* Sample Script\n\n    ```\n    // : Given\n    RockPaperScissorHandSign rock = RockPaperScissorHandSign.ROCK;\n    \n    // : When\n    RockPaperScissorHandSign winner = rock.getWinner();\n    RockPaperScissorHandSign loser = rock.getLoser();\n    \n    // : Then\n    System.out.println(winner);\n    System.out.println(loser);\n    ```\n\n\n\n* Sample Output\n\n    ```\n    PAPER\n    SCISSORS\n    ```\n\n#### PAPER\n* Sample Script\n\n    ```\n    // : Given\n    RockPaperScissorHandSign paper = RockPaperScissorHandSign.PAPER;\n    \n    // : When\n    RockPaperScissorHandSign winner = paper.getWinner();\n    RockPaperScissorHandSign loser = paper.getLoser();\n    \n    // : Then\n    System.out.println(winner);\n    System.out.println(loser);\n    ```\n\n\n\n* Sample Output\n\n    ```\n    SCISSORS\n    ROCK\n    ```\n\n\n\n#### SCISSORS\n* Sample Script\n\n    ```\n    // : Given\n    RockPaperScissorHandSign scissors = RockPaperScissorHandSign.SCISSORS;\n    \n    // : When\n    RockPaperScissorHandSign winner = scissors.getWinner();\n    RockPaperScissorHandSign loser = scissors.getLoser();\n    \n    // : Then\n    System.out.println(winner);\n    System.out.println(loser);\n    ```\n\n\n\n* Sample Output\n\n    ```\n    ROCK\n    PAPER\n    ```\n\n\n\u003chr\u003e\n\u003chr\u003e\n\n## Section 4 - Collections\n\n### Lab\n* **Description**\n\t* The purpose of this class is to encapsulate a `name` and `LabStatus` for a particular instance of a `Lab`\n* **Methods to Complete**\n\t* `String getName()`\n\t* `LabStatus getStatus()`\n\t* `void setStatus(LabStatus status)`\n\n### Student\n* **Description**\n\t* The purpose of this class is to encapsulate and manage a composite `List` of `Lab` objects.\n* **Methods to Complete**\n\t* `Lab getLab(String labName)`\n\t* `void setLabStatus(String labName, LabStatus status)`\n\t* `void forkLab(Lab lab)`\n\t* `LabStatus getLabStatus(String labName)`\n\n### LabStatus\n* **Description**\n\t* The purpose of this class is create enumerations representative of different states of a `Lab` for a particular `Student`.\n* **Enumerations to be created**\n\t* `COMPELTED`, `INCOMPLETE`, `PENDING`\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003chr\u003e\n\u003chr\u003e\n\n## Section 5 - Generics\n### ArrayUtility\n* **Description**\n\t* The purpose of this class is to create a utility for handling generic array operations.\n* **Methods to Complete**\n\t* `SomeType findOddOccurringValue()`\n\t* `SomeType findEvenOccurringValue()` \n\t* `Integer getNumberOfOccurrences(SomeType valueToEvaluate)`\n\t* `SomeType[] filter(Function\u003cSomeType, Boolean\u003e predicate)`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzipcodecore%2Frefactored-train","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzipcodecore%2Frefactored-train","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzipcodecore%2Frefactored-train/lists"}