Find Jobs
Hire Freelancers

Write a Java program

$30-250 USD

Færdiggjort
Slået op næsten 8 år siden

$30-250 USD

Betales ved levering
You will implement a game of Memory using 40 cards. Each card will contain a value corresponding to an uppercase letter, between A and T. Each different letter will be used in exactly two cards. The cards will be presented to the user in a text console in 5 rows of 8 cards each. For each card, you will use the letter of the card if it is visible, or an asterisk (*) if it is not. There will be a single space between cards, and a single line break between lines. At the start of the game, all cards will be shuffled into a random order, and hidden, and a new round will start. At the start of each round, the cards will be presented. After a line break, a prompt will be presented asking for “Select a card:”, and the application will read a position from the terminal. After reading the position, the corresponding card will be made visible, and the cards will be again presented to the user. Another prompt will be shown with the text “Select another card:”, and another position will be read from the terminal. Again the corresponding card will be made visible, and the cards will again be presented to the user. The user must provide the position of the selected card using a two-digit number. The first digit will correspond to the row, while the second digit will correspond to the column, with rows and columns being counted from zero (e.g., 00 is the card in the first row and first column, while 47 is the card in the last row and last column). After both cards are shown to the user, the program will compare their values. If the values are the same, both cards are removed from the table. If they are different, they are again marked as hidden. In either case, no card should move positions. Any position where a card was removed will be replaced with a space to indicate that there is no card in that position. There is no reshuffling at any point. After this takes place, a new round starts, and the cards are presented again to the user. After all cards are removed from the table, your program should close. Note that, since the console will present the new cards just below the previous round, the user will still be able to see the cards that were supposed to be hidden. This is perfectly acceptable for this assignment. OPTIONAL: If you wish to do any extra processing at this case, you are welcome to do so, but note that it will not incur in any additional marks. One suggestion in this scenario is to print a long series of empty lines. If you do so, though, make sure to give the user enough time to see the second selected card before cleaning the table. You can do so by calling “[login to view URL](2000);”, replacing 2000 with an appropriate number of milliseconds to wait. When reading a position from the terminal, you must check if the position is valid. Validity in this case includes checking if the position has the correct length, contains only valid digits, contains digits that are within the boundaries of the number of rows and columns, and that the position still has a card (no card was removed from that position). If the position is invalid, you must print an appropriate message explaining why the position is invalid, and ask for a new position. You must repeat the validity check for all positions you read. You must accept a number between 1 and 8, and reject any invalid input. After reading the number of players, you will read the name of each player, which can be any valid string. Each player will also be initialized with a score of zero. A random player will be assigned to be the first to play. Once the player names are read, the game starts as in part 1. However, before reading the first position of a round, you must print the name of the player that is in turn. After the round is complete, if the cards have the same value, the player currently in turn will have its score incremented by 1 (one). The current player continues to be in turn. If the cards have different values, the next player in the list (or the first player, if the last player in the list is in turn) will receive the [login to view URL] the end of the game, after all cards are removed from the table, the application will print the names of all players and their corresponding scores. The format of the scores is open, as long as it is clear. You are free to print the player names in the order they were inputted or in decreasing order of score.
Projekt-ID: 10566036

Om projektet

10 forslag
Projekt på afstand
Aktiv 8 år siden

Leder du efter muligheder for at tjene penge?

Fordele ved budafgivning på Freelancer

Fastsæt dit budget og din tidsramme
Bliv betalt for dit arbejde
Oprids dit forslag
Det er gratis at skrive sig op og byde på jobs
Tildel til:
Brug Avatar.
Hi sir, I have read the complete requirement for the javascript memory game using 40 cards. Will complete it in few hours. Thanks
$30 USD på 1 dag
5,0 (155 anmeldelser)
5,5
5,5
10 freelancere byder i gennemsnit $212 USD på dette job
Brug Avatar.
A proposal has not yet been provided
$100 USD på 1 dag
5,0 (34 anmeldelser)
5,2
5,2
Brug Avatar.
Dear sir, I've read your requirements twice. As an MS in Computer Science, this Java console assignment is very simple to me. I'll complete it within 18-24 hrs with 100% accuracy. Kind regards, Francis T.
$99 USD på 0 dag
5,0 (90 anmeldelser)
5,3
5,3
Brug Avatar.
Hi, I have strong background in JAVA and experience in Programming. Let me help you. I am ready to start. Please send me a message so we can discuss.
$144 USD på 3 dage
4,7 (32 anmeldelser)
5,3
5,3
Brug Avatar.
Hi there.. I have read your project details clearly and willing to do it for you... I am expert Java Programmer and Computer Science Graduate... Initiate a chat and let's do it...
$750 USD på 7 dage
4,6 (20 anmeldelser)
4,6
4,6
Brug Avatar.
We are a team of experts which are dealing with various projects such as writing, technical writing, Engineering, PCB designing, FPGA, Verilog /VHDL, MATLAB, Mathematics, Calculus, SPSS, Statistic, CUDA, OpenGL, Pattern recognition, Image processing, signal processing, C++/C programming, ETC. We are ready for hiring right now.
$333 USD på 30 dage
4,0 (10 anmeldelser)
3,9
3,9
Brug Avatar.
Hi, I am a proficient java developer working for more than 3 years with enterprise technologies. However, I like how you have described the project, very clear and to the point - at some points I could've seen you are a developer. Let's have a chat and you will get the project in 1-2 days maximum. I was looking at the others and made me laugh, 750$ is ridiculous too much for this assignment. But maybe I have understood wrongly the details. However, let's have a chat to better understand it! Looking forward working with you, Ioan
$100 USD på 2 dage
5,0 (2 anmeldelser)
1,5
1,5
Brug Avatar.
I have read the details of your project. I will do the work the way you want it. I am expert for this project because I have worked on many same as this project. I got enough skill to maintain it. You do not need to be worried about the project. I am 100% good fit for this and I will complete it as the way you expect it..
$200 USD på 10 dage
5,0 (4 anmeldelser)
0,0
0,0
Brug Avatar.
i can do this work within few hours with 100% reliable results. waiting for your response. thank you.
$166 USD på 0 dag
0,0 (0 anmeldelser)
0,0
0,0
Brug Avatar.
Hello i am new to freelancing and have just recently graduated with an honours in computer science. I would love to complete your project for you. I am just about to write a similar project for my own portfolio so doing this is not a problem. Regards
$170 USD på 7 dage
0,0 (0 anmeldelser)
0,0
0,0
Brug Avatar.
Being an experienced Java developer, plus a Software Engineer, I will deliver a product that will not only satisfy the requirements, but also will have a very clean design, excellent structure, and a fully documented code. The code will be very easy to understand, maintain, and modify.
$250 USD på 2 dage
0,0 (0 anmeldelser)
0,0
0,0

Om klienten

Flag for CANADA
Delta, Canada
5,0
19
Betalingsmetode verificeret
Medlem siden jan. 20, 2016

Klientverificering

Tak! Vi har sendt dig en e-mail med et link, så du kan modtage din kredit.
Noget gik galt, da vi forsøgte at sende din mail. Prøv venligst igen.
Registrerede brugere Oprettede jobs i alt
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Indlæser forhåndsvisning
Geolokalisering er tilladt.
Din session er udløbet, og du er blevet logget ud. Log venligst ind igen.