Question: This third assignment will allow you to explore (by comparing and contrasting through construction and implementation) two different object-oriented programming languages (C++ and Java) You


This third assignment will allow you to explore (by comparing and contrasting through construction and implementation) two different object-oriented programming languages (C++ and Java) You will be creating two separate programs-one written in C++ and ons written in Java. For this assignment, we are going to explore how we can use objects to build more expressive and cleaner programs. In honor of the upcoming event that is known as March Madness and the fact that we are in Indiana (the basketball capital of the world), you will be simulating a game of horse in basketball. The rules we will use for our simulation are as follows: The game must be played with two players. Each player will simulate shooting the basketball. If one player hits their shot while the other misses their shot, the player that missed the shot collects a letter-beginning with the letter 'H' of the word "HORSE and iterating through each letter for each subsequent miss If both players hit their shot, or both miss their shot, then we continue to the next round. The game continues until one player has collected all of the letters necessary to spell the word "HORSE" at which point that player is declared the loser of the game. ikihow.com Play-Horse-the-Basketbal-Game) Your goal is to create a program to simulate this game. This game will be tum-based, meaning that one player will go followed by the next, and so on. The game will continue until one player wins. At which point you should prompt the user if they would like to play again (YN) Development Process: For this assignment, all development must take place on the master ranch in a private GitHub repository. You must add me and all four (4) TA's as collaborators. It is strongly recommended that you commit and push often! We will be checking to make sure that you are actively pushing changes to your repository. You are also required to include the Honor Pledge in each one of your source files (any file that you have written "code" in you need to include the Honor Pledge). You are required to implement the following items as part of this assignment: Your C++program must contain three files (2 cpp and l h file). These files should be named as such: G cpp, Player.cpp, Player.h Your Java program must contain the following two files: Gamejava and Playerjava. Your Game class must store two Players on the Heap Your Player class must use a character array to store the word. In the C++ version we will need to manage our memory accordingly no memory leaks! You can use a random number generator to generate whether or not the Player hits the shot let's assume each Player has a 50% shooting percentage as a default value. When a game finishes we should prompt the user if they would like to play again. The options available to them should be "Y or "N o If they select Y, then the program should simulate a new game -with all new Players. If they select N, the program should terminate. 1 of 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
