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
Concept explainers
Question
Write Visual Basic program that asks the user to enter a 10-character telephone number in the format of XXX-XXX-XXXX. The program should display the number with any alphabetic characters translated into the number equivalent. For example, if the user enters 555-GET-FOOD, the result should be 555-438-3663.
Many companies use telephone numbers like 555-GET-FOOD so the number if easier to remember. On a standard telephone, the alphabetic letters are mapped to numbers in the following manner:
A, B, C = 2
D, E, F = 3
G, H, I = 4
J, K, L = 5
M, N, O = 6
P, Q, R, S = 7
T, U, V = 8
W, X, Y, Z = 9
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 4 steps with 6 images
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 program that asks for the number of calories and fat grams in a food. The program should display the percentage of calories that come from fat. If the calories from fat are less than 30% of the total calories of the food, it should also display a message indicating that the food is low in fat. One gram of fat has 9 calories, so Calories from fat = fat grams * 9. The percentage of calories from fat can be calculated as Calories from fat ÷ total calories . Input Validation: Make sure the number of calories and fat grams are not less than 0. Also, the number of calories from fat cannot be greater than the total number of calories. If that happens, display an error message indicating that either the calories or fat grams were incorrectly entered.arrow_forwardCreate a case detector program in the JAVA language in which the user enters an alphabet and the program should print "Uppercase" if the character is an uppercase alphabet, else print "Lowercase" if the character is a lowercase alphabet. The program should also display an error message if the character entered is not an alphabet.arrow_forwardWrite a program that asks for the number of calories and fat grams in a food. The program should display the percentage of calories that come from fat. If the calories from fat are less than 30 percent of the total calories of the food, it should also display a message indicating the food is low in fat. One gram of fat has 9 calories, soCalories from fat = fat grams * 9The percentage of calories from fat can be calculated asCalories from fat ÷ total caloriesInput Validation: The program should make sure that the number of calories is greater than 0, the number of fat grams is 0 or more, and the number of calories from fat is not greater than the total number of calories.arrow_forward
- if characters ‘Y’, ‘R’ and ‘B’ represents the primary colors Yellow, Red and Blue; this algorithm reads two of these characters and determine the color resulting of their mix. You must envision every possible outcomes including the case where the two inputs are the same and the case where only one input is read (this means the user inputted only one color). write this Code in the C# programming languagearrow_forwardWrite a program that calculates the future value of an investment at a given interest rate for a specified number of years. The formula for the calculation is: futureValue = investmentAmount * (1 + monthlyInterestRate)years*12 Use text fields for the investment amount, number of years, and annual interest rate. Display the future amount in a text field when the user clicks the Calculate button,arrow_forwardLOTTERY Bill buys 10 lottery tickets which he plays randomly. Let us write a C# program for Bill that suggests random numbers for him. After the winning numbers are drawn, the program informs Bill of the results of each lottery ticket. There are 5 winning numbers in one lottery ticket. Each number is from 1 to 90.arrow_forward
- HW7: Write a program in C language for the students Grading System: If the mark is less than 50 print "Fail" If the mark is between 50 and 59 print "Pass" If the mark is between 60 and 69 print "Medium" If the mark is between 70 and 79 print "Good" If the mark is between 80 and 89 print "Very Good" If the mark is between 90 and 100 print "Excellent" If the mark been entered over 100 you will get the following message "Can you kindly enter the mark between 0 to 100"arrow_forwardA long-distance carrier charges the following rates for telephone calls between the United States and Mexico: Starting Time of Call Rate per Minute 00:00-06:59 $0.12 07:00–19:00 0.55 19:01-23:59 0.35 Write a program that asks for the starting time and the number of minutes of the call, and displays the charges. The program should ask for the time to be entered as a floating-point number in the form HH.MM. For example, 07:00 hours should be entered as 07.00, and 16:28 hours should be entered as 16.28.arrow_forwardWrite a program that input and display your name, class, section, computer science degree, and your age.Example (screen output):Ahmad AliFirst year/Group ASystems & Control DepartmentMy computer science degree= 70 My age= 20arrow_forward
- Write a pseudocode for the real percentage-to-numerical-grade-equivalent displaying. Only one percentage score can be entered at a time. The grading scale is as follows:arrow_forwardHello, I need to solve this problem with C++ programming language using Visual Studio. Thank you.arrow_forwardIn a program, write the program's algorithm that calculates the sum of odd integers (T1) from 1 to N, the sum of even integers(T2), and the sum of integers increasing by 5 (T3) and prints these values (T1, T2, T3) on the screen.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