Related questions
Concept explainers
USING java:
Create a simple Tic Tac Toe game designed for one player (against computer). you will need to create arrays and functions to complete this
The first screen should ask the user for his name, print a welcome message, and display an empty 3x3 Tic Tac Toe board. Then, the program should ask the user to put the coordinates of his move. once the user enters the coordinates, the program should respond accordingly with a print of the user's move and the computer's move. this should go on until a winning pattern is found.
Key steps: Game board is designed, user inputs taken and marked on the board, validate the inputs that no two inputs at the same place and out of range, check the winner/loser and complete the game.
Step by stepSolved in 3 steps with 2 images
- this is javaarrow_forwardCreate the following program in java: Write a java program that lets a meteorologist record day and evening temperature for a certain number of days. The temperatures must be stored in a two-dimensional array. Your program should: · Ask the meteorologist the number of days he/she wants to record temperatures for. · Read the temperatures. · Report the number of days where both the day and evening temperature are below average. · The number of days where the difference between the day and evening temperature is less than 10. · The highest and lowest day and evening temperature.arrow_forwardUsing Java Develop a program that allows the user to enter numbers into an array. Input will be as follows:The user will enter the total number of integers to be entered into the array.The user will then enter that number of unique integers (negative or positive). Do not allow the number of valuesentered to exceed the array size.Develop the following methods(SIX) to:- The ‘main’ method- Print the array- Sort the array(YOU MUST DEVELOP YOUR OWN SORT METHOD –don’t use the API classes).- Determine the highest value.- Determine the lowest value.- Calculate the average value (double)Program Logic (algorithm):- Prompt and get the size of the array- Create the array of that size- Loop through the initialization of the array- Prompt the user for each value- Save the value in the corresponding element-Print the array- Sort the array- Print the array again- Output the highest value- Output the lowest value- Output the averagearrow_forward
- This is need in Java Declare an array named temperatures that can hold 10 doubles.arrow_forwardcreate a program based on the following pseudocode: put the usual three comments at the beginning: your name, the date, and the program's name, which is snowfall your program will allow the user to enter the number of inches of snow that fall during a user-defined number of days dynamically allocate an array large enough to hold those days once all of the inches of snow, which may be any number from zero and up, have been input, the array should be passed to a function that sorts them in descending order of inches another function should be called that calculates the average number of inches of snow per day your program should display the sorted list of snow inches and snow average with appropriate headings use pointer notation rather than array notation whenever possible input validation: do not accept zero or negative numbers for number of days input validation: do not accept negative values for snow inches save your .cpp file, or another compiler and submit it herearrow_forward4. Given an integer array of size 10, write a Java program to prompt the user to enter an integer value num and in the output print all numbers in the array greater than num. If no such number is present then print the message "No Results Found." in the output. Given Array: {12,67,45,89,94,56,78, 34, 47, 63}arrow_forward
- Please help me write this Java code for this question I’m having troublesarrow_forwardIn JAVA PROGRAMMING please read details on pictures thank you. (You will need to read in the student data first and then read in the scores) You will open each file and read the information into their respective classes/arrays For each student, you will calculate their lowest score, their highest score, their average, and their grade. For each quiz, you will calculate the lowest score, the highest score, and the average You will create and print an Honor Role. The Honor Role comprises students who received an ‘A’ grade. REPORT WILL LOOK LIKE THIS LastName FirstName StudentID Score 1 Score 2 Score 3 Score 4 Score 5 High Low Average Grade High...arrow_forwardProblem Description - JAVA PROGRAMMING Use a Two-dimensional (3x3) array to solve the following problem: Write an application that inputs nine numbers, each of which is between 1 and 10, inclusive. Display the array after the user inputs each value. Rotate/flip the array by changing places. Make the rows columns and vice versa. You have to move the elements to their new locations. Remember to validate the input and display an error message if the user inputs invalid data. Documentation and the screenshot(s) of the results. Example: 1 2 3 4 5 6 7 8 9 the result will be : 1 4 7 2 5 8 3 6 9arrow_forward
- Create the following program to demonstrate working with arrays in java. Your company pays its sales staff on a commission basis. Each employee receives 500ドル per week plus 6.5% of their sales. For example, a salesperson who sells 10,000ドル worth of products will get a salary of 500 + (10000 * .065) or 1150ドル for that week. You are given the task of creating a program to allow a manager to enter in the sales for 10 employees. (Store them in an array of course.) Then it should display the 10 sales amounts, the 10 salaries for this pay period, and the average salary. (Hint: There are a couple ways to approach this one, here are two ideas: (1) You could create a second array for the salaries and load it at the same time as you gather and store the sales, then loop through the salaries one to find the average, and then you have all the pieces to print. (2) Another solution would be to take in the sales, and then calculate the salaries on the print (which means you don't have to store them in a...arrow_forwardConsider the following program specification: Write a program that will prompt the user for 10 integer values and stores them in an array. The values entered by the user only be between 0 and 100 and the program should validate these appropriately. The program should then: Display the average of the values Display the highest value in the array Display the lowest value in the array Discuss how the values should be validated. What control structures could be used? Using eclipsearrow_forwardCalculate the sum and average of two dimensional array of int 4*4 You need to read from the user the integer values of the array and after all calculations, you need to display the value of the sum and the value of the average java codearrow_forward
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education