Write a Java
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Data Structures and Algorithms in Java
Additional Engineering Textbook Solutions
Management Information Systems: Managing the Digital Firm (15th Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
Java: An Introduction to Problem Solving and Programming (8th Edition)
C++ How to Program (10th Edition)
- Read the following scenario: To implement an exam, an instructor first notifies the students of the exam date and the topics to be covered. The instructor will prepare the exam paper, gets it copied to produce enough copies for the class, and hands it out to students at the designated time and location. The students attempt their answers to exam questions and hand in their answer papers to the instructor. The instructor then gives the answer papers to the tutor, along with sample solutions to each question, and gets them to mark it. The tutor will then records all the marks and return the answer papers to the students. After the answer papers have been returned to the students, they can raise any issues or queries about the marks they received. The instructor then reviews these queries/issues and decides whether marks adjustments are needed. If there are marks adjustments, the instructor will request the tutor to make the necessary changes in the marks record. Draw a sequence diagram…arrow_forwardWrite a Java program to simulate a blackjack game of cards. The computer will play the role of the dealer. The program will randomly generate the cards dealt to the player and dealer during the game. Cards in this game will be represented by numbers 1 to 13 with Ace being represented by a 1. Remember, that face cards (i.e. Jack, Queen, and King) are worth 10 points to a hand while an Ace can be worth 1 or 11 points depending on the user’s choice. The numbered cards are worth their number value to the hand. Here are the details of how to play the game: To start the game, the player is given two randomly chosen cards and told their values. The dealer is then given two cards randomly. The human player should only be told the value of the first card given to the dealer. The other card in the dealer's hand is "hidden" until the end of the game. The player is then asked if they want to draw another card for their hand. While the player wishes to draw another card and neither hand has gone…arrow_forwardWrite one java code program with a class whose instances represent a single playing card from a deck of cards. Playing cards have two distinguishing properties: rank and suit. (get and set)Note: show screenshot of the outputarrow_forward
- Write a Java program to simulate a blackjack game of cards. The computer will play the role of the dealer. The program will randomly generate the cards dealt to the player and dealer during the game. Cards in this game will be represented by numbers 1 to 13 with Ace being represented by a 1. Remember, that face cards (i.e. Jack, Queen, and King) are worth 10 points to a hand while an Ace can be worth 1 or 11 points depending on the user’s choice. The numbered cards are worth their number value to the hand. Here are the details of how to play the game: To start the game, the player is given two randomly chosen cards and told their values. The dealer is then given two cards randomly. The human player should only be told the value of the first card given to the dealer. The other card in the dealer's hand is "hidden" until the end of the game. The player is then asked if they want to draw another card for their hand. While the player wishes to draw another card and neither hand has gone…arrow_forwardWrite a Java procedural program that helps organise travellers with a specific travel company arriving at an airport, telling them which queue to join based on their hotel. The program asks each traveller what their hotel is (the choices are the Seaview for which they need to join Queue 1, the Majestic for which they need to join Queue 4 and the Grand for which they need to join Queue 7) and tells them the right queue. There are 1330 travellers with the tour company and each will use the program as they arrive. After all have indicated their hotel, the program then prints the percentage in each hotel. * See image for an example run of the program. Percentages should be printed truncated to two decimal places. Do this using a method you write yourself that multiplies by 100, converts to an integer then divides by 100. * must make use of a counter-controlled for loop, be in procedural programming style (not OOP)arrow_forwardCreate a cashiering system in Java that applies the OOP concept. There should be a receipt that will be shown after that includes the vat of 12%, the subtotal, total amount, cash, change, etc.arrow_forward
- Write a java program that may pass for a Basic Calculator with a graphical user interface and OOP paradigm. Your calculator should have functions for: addition, subtraction, multiplication, division, modulo, exponent function(^). Use oop technique and create a class called calculator that provide unique method body for each problem. Thus, your class should have six different method for these (addition, subtraction, multiplication, division, modulo, exponent function(^)) and use the GUI for user interaction.arrow_forwardNote: write a java program given below. Q2: Create a time class that accepts hours, minutes and seconds. Define appropriate getter/setter methods. If the time is incorrect, an appropriate message is displayed. Now create few instances of Time in Test class. Assign them appropriate valuesarrow_forwardPlease code in java and follow the instructions as it is please.. Dont use very advanced methods. refer the images attached The new manager of a craft beer pub. On your first day, the ATF demands an audit ofyour beer inventory in dollar amounts. The problem is that you’re on-tap kegs are only partiallyfilled. You must determine the current retail worth of a tapped keg, based on the percentage ofbeer remaining, and the price of the beer per pour.Facts:A full-sized keg is 15.5 gallons.There are 128 ounces in 1 gallon.Beer is served in a pint glass There are 16 ounces in 1 pint.InputYour solution must take in two inputs. The first input represents the percentage of beerremaining in the keg represented as a decimal ratio, with valid ranges from 0.0 (empty) to 1.0(full). The second input represents the price of the beer per serving, as dollars and cents.OutputThe output should display the following text: "There is $<dollars> of beer left in keg" where<dollars> is the numerical…arrow_forward
- USING JAVA: Implement a simple e-mail messaging system. A message has a recipient, a sender, and a message text. A mailbox can store messages. Supply a number of mailboxes for different users and a user interface for the user to login, send messages to other users, read their own messages, and log out.arrow_forwardWrite one java code program with a class whose instances represent a single playing card from a deck of cards. Playing cards have two distinguishing properties: rank and suit.Note: show screenshot of the outputarrow_forwardWrite a Java program that prompts the user for at least two input values. Then write a method that gets those input values as parameters and does some calculation/manipulation with those values. The method than should return a result of the calculation/manipulation back to the main, where it is printed. The program should prompt the user, call the method, and then print a meaningful message along with the value returned from the method.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education