The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 2 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Use JAVA to solve the assignment
You must display your code and run the projects to demonstrate the output.
Submit each project individually..
JAVA Project 1
Random Number Guessing Game
Write a program that generates a random number and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display “Too high, try again.” If the user’s guess is lower than the random number, the program should display “Too low, try again.” The program should use a loop that repeats until the user correctly guesses the random number.
JAVA Project 2
Write a program that plays a simple dice game between the computer and the user. When the program runs, a loop should repeat 10 times. Each iteration of the loop should do the following:
As the loop iterates, the program should keep count of the number of times the computer wins, and the number of times that the user wins. It should also display the results of each roll.
After the loop performs all of its iterations, the program should display who was the grand winner: the computer or the user.
JAVA Project 3
Employee Class
Write a class named employee with the following fields:
# name. The name field references a String object that holds the employee's name.
# idNumber. The idNumber is an int variable that holds the employee's ID number.
# department. The department field rerences a String object that holds the name of the department where the employee works.
# position. The position field references a String object that holds the employee's job title.
The class should have the following constructors:
-A constructor that accepts the following values as arguments and assigns them to the appropriate fields: employee's name, employee's ID number, department, and position.
-A constructor that accepts the following values as arguments and assigns them to the appropriate fields: employee's name and ID number. The department and position fields should be assigned an empty string(**).
-A no-arg constructor that assigns empty strings (**) to the name, department, and position fields, and 0 to the idNumber field.
Write appropriate mutator that store values in these fields and accessor methods that return the values in those fields. Once you have the class, write a separate program that creates three Employee objects to hold the following data:
Name : Susan Meyers Mark Jones Joy Rogers
ID Number : 47899 39119 81774
Department : Accounting IT Manufacuturing
Position : vice Pres. Programmr Engineer
The program should store this data in the three objects and then display the data for each employee on the screen.
----------- ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly