Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
In a class
I created a bar code that takes the 1st letter of an event name and the 1st letter of the 1st word and the 2nd word of an event location.
In a test class:
How would I check for example if HPC1230000 generated bar code matches code generated that was displayed in a menu that listed events. I want to check based on code entered to register people for an event from user input.
This is in Java
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write a Java program that generates detailed information about an available accommodation. The accommodation is described as a fully renovated house on the main floor with a kitchen. It has two unfurnished bedrooms and is located near Oshawa Center, Walmart, and Canadian Tire. The program should provide information about the walking distance to a bus stop and the proximity to Whitby Campus and Oshawa Campus. Serious inquiries are emphasized, and the accommodation is prepared for occupancy on January 1st. The contact numbers for inquiries should also be included in the output. Can you provide a Java program that accomplishes this task?arrow_forwardYou've decided to test the wifi speed in the classroom at the beginning of every lecture. Create a program that will tell you if the wifi speed over the past 3 classes has increased, decreased, or neither. If the wifi speeds are sorted and increasing, then print out "The wifi is getting faster!". If the wifi speeds are sorted and decreasing, then print out "The wifi is getting slower!". If the wifi speeds are unsorted or if two or more speeds are the same, then print "The wifi speed is changing unpredictably." The user should input 3 non-negative numbers (double) separated by spaces. Sample runs: Enter wifi speeds over the last 3 classes: 162 180 225 The wifi is getting faster! Enter wifi speeds over the last 3 classes: 37.5 21.2 19.9 The wifi is getting slower! Enter wifi speeds over the last 3 classes: 162 135.3 225 The wifi speed is changing unpredictably. Ensure you are doing basic input validation, output Please enter a valid input. if the user inputs a negative wifi speed. Make…arrow_forwardI have been working on writing a java program (that goes with another I just got finished- see below CollegeCourse & Student) that prompts user to put in letter grades (A-F) for 5 different courses for a total of 10 different students. So I need to prompt user to input a student ID, then the 1st course ID, then the grade, then the 2nd course ID- then grade, the the 3rd course ID then grade, then the 4th course ID then grade, then finally the 5th course ID then grade. Then it needs to go through the same thing 10 times (for a total of 10 students). It also says the user is asked to "Enter ID for student #s" where s is an integer from 1 through 10, indicating the student (and I don't really know how to do that but I tried as I googled java); AND "Enter course ID #n, where n is an integer from 1 through 5, indicating the course number. And last it needs to verify for grade entry that only the A, B, C, D, or F are entered.I started writing notes to try to keep track of where thing are…arrow_forward
- Write a java program that will create a Deck object and shuffle the deck. Then, you will draw ten cards from the deck and perform selection statements that carry out the following: If the card is red, then print “Card is red” to the screen. Otherwise, print “Card is black” to the screen. If the card is a picture card, print “That's a picture card”. If the card is an ace, print “That's an Ace”. If the card has a value less than 6, print “Card has a small value”. If the card has a value between 6 and 10 (inclusive), print “Card has a large value”. In the source code, write an algorithm for the program in a comment block. Also, in a comment block, paste the results of running your program. Print out and turn in the completed source code with those comments.arrow_forwardWrite a Java class called Rectangle that represents a rectangular, two-dimensional region. In thislab you learn overriding a system method. Create a default, empty constructor.Set the double values for the ‘x’ ‘y’ ‘height’ ‘width’ in the Rectangle objects whose top-leftcorner is specified by the given ‘x’ and ‘y’ coordinates and by the width and height. Your classwill need to use setters and getters with these 4 values. Recall we discussed in class lectures toput values into the instantiated object.Override the ‘toString()’ base method to produce the following information inside the singlequotes. EXAMPLE OF OUTPUT=‘Rectangle [x=2.5, y=13.0, height=14.0, width=4.0] Area is 54.0’Write a test program called TestRectangle that creates objects of the Rectangle class called rect1and rect2. Assign values to the fields of these objects. Print out these Rectangle objects usingSystem.out.println() from inside the main() method (Hint: this will utilize the overridden‘toString()’ in the Rectangle…arrow_forwardFor this problem, you are given a java code FlipAgain.java. Copy the .java file to your project folder. Open the file in your IDE. You have to edit this code to make it work. You can see that the code I have given you does not compile. So, you won’t be able to run it without fixing the code. Perform the following tasks in order. The code as given does not compile. Notice that the while loop tests if again.equals("y"), but the variable again doesn't have a value at first. Give it a value so that the code will compile and the loop will run at least once. Now that the program is working, change the loop from a while loop to a do-while loop. Make sure it still works. What happens if you delete what you added in step 1? Change the line back to just String again; Does the program still work? Why or why not? (Answer in a comment in the program.) After completing the above three tasks submit the final code, where you converted the while loop to do-while loop. FlipAgain.java ----->…arrow_forward
- write a program using java Create a class named “Rectangle” having length and width as attribute. There should be behaviors to set the values of length and width (individually and collectively), and get their values individually. There should also be behavior to display the perimeters and area of the rectangle. Create another class named as Main which has two objects of Rectangle (r1, r2) having length (3.2, 20) and width (4.5, 36) respectively. Also display the length, width, perimeter and area of both rectangles.arrow_forwardAdd a new Java class to your project by right clicking on the src folder in the Project pane and select New > Java Class.Enter Hours as the name for this class, and IntelliJ will add it to the files in the src folder for your project. Remember tocopy and insert the standard heading for the main method as you did for Program 2.Write a program that prompts the user to enter a number of hours, and produces the equivalent number of days as a wholenumber along with the number of hours left over. Assume that a day has exactly 24 hours. The following example showsthe format to use for your output, where the input entered by the user is underlined.Enter the number of hours: 100100 hours is 4 days, plus 4 hours.Define Variables: The number of hours will be a whole number, and we would like to obtain results as whole numbers ofdays and hours, so use the int data type to declare the variables to hold the numbers of hours input, as well as the results(the number of days and number of hours left…arrow_forwardDevelop a set of classes for a college to use in various student service andpersonnel applications. Classes you need to design include the following:• Person—A Person contains a first name, last name, street address, zip code,and phone number. The class also includes a method that sets each datafield, using a series of dialog boxes and a display method that displays all of aPerson’s information on a single line at the command line on the screenarrow_forward
- Implement a simple e-mail messaging system. I have already designed a Message class and a Mailbox/MailboxTest class. A message has a recipient, a sender, and a message text. A Mailbox can store and manipulate messages and tell the user how many they have. Supply a number of mailboxes for different users and a user interface(GUI) for the user to login, send messages to other users, read their own messages, and log out. Please explain each thing you do. Here is my Message class: publicclass Message { private String recipient; private String sender; private String messageBody; public Message(Stringsender, String recipient) { this.sender =sender; this.recipient =recipient; this.messageBody =""; } public void append(String text) { this.messageBody +=text +"\n"; } public String toString() { return "From: " + this.sender+ "\n" + "To: " + this.recipient + "\n" + "Message: " + this.messageBody; } } Here is Mailbox class: import java.util.ArrayList; publicclass Mailbox{ private…arrow_forwardJava Question - Instructions are in the attached pictures. The picture titled "Screenshot..." are the instructions for building the specific code, while the "Final Output" picture shows what the output of the code should look like. Please make sure no errors show up in the Java compiler. Thank you.arrow_forwardI was asked to add the three types of comments to this class, each consisting of the same statement (this statement is also printed once). The output/print, block comment, and single line comment has all been marked correct. The Javadoc comment, however, has not. I asked this question earlier and tried implementing that solution, however, it did not work. What should I do to make it work?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- 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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education