JAVA PROGRAMMING-LMS INTEG.MINDTAP
8th Edition
ISBN: 9781337091503
Author: FARRELL
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 7, Problem 7PE
Explanation of Solution
Program:
File name: “ThreeLetterAcronym.java”
//Import necessary header files
import java.util.Scanner;
//Define a class named ThreeLetterAcronym
public class ThreeLetterAcronym
{
//Define main method
public static void main(String[] args)
{
//Create an object for Scanner class
Scanner input = new Scanner(System.in);
//Read input from the user
String sentence = input.nextLine();
//Split sentence (with spaces) into words
String[] words = sentence.split("\\s+");
//Declare a variable and initialize the value
int i = 0;
//For loop to display 3 letter Upper case Acronym
for...
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Three-letter acronyms are common in the business world. For example, in Java you use the IDE (Integrated Development Environment) in the JDK (Java Development Kit) to write programs used by the JVM (Java Virtual Machine) that you might send over a LAN (local area network). Programmers even use the acronym TLA to stand for three-letter acronym. Write a program that allows a user to enter three words, and display the appropriate three-letter acronym in all uppercase letters. If the user enters more than three words, ignore the extra words.
Write Java code
import java.util.*;
public class ThreeLetterAcronym {
public static void main(String[] args) {
// Write your code here
}
}
Three-letter acronyms are common in the business world. For example, in Java you use the IDE (Integrated Development Environment) in the JDK (Java Development Kit) to write programs used by the JVM (Java Virtual Machine) that you might send over a LAN (local area network). Programmers even use the acronym TLA to stand for three-letter acronym. Write a program that allows a user to enter three words, and display the appropriate three-letter acronym in all uppercase letters. If the user enters more than three words, ignore the extra words.
JAVA Programming Language:
According to the American Heart Association, as you exercise you should periodically check your heart rate to ensure you are in your target zone. Your target zone is a range that is 50% to 85% of your maximum heart rate. The formula for calculating a persons maximum heart rate is 220 minus your age in years.
Write a program that reads the users current heart rate, birthday, and the current day (each consisting of month, day, and year). The program should calculate the persons age (in years), the person's maximum heart rate, and the person's target heart rate zone range.
Output the users age, current heart rate, target zone range. If their heart rate is in the target zone congratulate them, if it is out of their target zone warn them.
Required Methods (Write these first and use them in your algorithm): (your code, particularly for computeAge, must be 100% clear and documented - it's the core of this assignment!)
int computeAge(int birthMonth, int birthDay,…
Chapter 7 Solutions
JAVA PROGRAMMING-LMS INTEG.MINDTAP
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
- A code in c++ or python A program that asks you to enter the name of a movie or series, and then proceed to ask how much you rate the movie or series on a scale of 1 to 10, then ask what rating you would give the series or movie, and have options for example: G, PG, PG-13, R and finally, a thank you message for your comments appears.arrow_forwardcreate a Python application that applies concepts of decorators in Python. Scenario: You are creating a text-based adventure game that will give the player a scenario and will allow them to pick a variety of actions that they can perform, which will then lead to another scene with another set of actions. The theme or story of the text-based adventure game will be up to you to decide. You can either base it on an existing story or come up with an original story of your own. If you are basing your story on an existing story, please tweak it or add some unique changes of your own to distinguish your story. Your text-based adventure game should have a minimum of 5 "levels" or "steps" in the story. In other words, the text-based adventure game should allow the player to make 5 actions in a row minimum that will not result in a game over for the player. This means that you can have "game over" states that end after the 1st or 2nd action, but at least one string of actions must have 5 actions…arrow_forwardShowCurrentTime.java an example program in Chapter, gives a program that displays the current time in GMT. Common old news shows would show clocks across many time zones, write a program that modifies ShowCurrent Time and will display the time in prominent business centers. London, Paris, New York was common. Write a program that displays the time in: Berlin, London, New York, Chicago, San Francisco, Tokyo and Hong Kong. ↓ HONG KONG ↓ LONDON L PARIS TOKYO MOSCOW 101 BERLIN DUBAI iStock Credit: Tetlana Muslyaka NEW YORKarrow_forward
- Computer Science Write and implement a program using JAVA and GUI, to find the devising and multiplication for three variables A (JTextField), B (JTextField) and C (JTextField), use button or checkbox to find the results which displayed in a label.arrow_forwardIn the Java programming language, write a program that opens a 400x200 window with two 200x200 buttons. One button says "Close" - which closes the program, and on the other the number "16". Each time you press this button, the number is halved until 1. When 1 is reached the button does not change anymore.arrow_forwardWrite a C# .NET Core Console App that asks the user to enter a character and line number and then displays a triangle of that size with the given character. For example, if the user entered * as a character and 3 as line number then you display the following triangle on the console window. * *** *****arrow_forward
- You are to create a Python application that applies the basic concepts in Python. Scenario: You are to create a python application that simulates a toll booth that will give out toll booth tickets to the driver depending on what type of vehicle they are driving. The user will enter their name, destination and vehicle type. The application will then determine what class of vehicle they are driving and assign them the correct fee. The application is to then print out a receipt with the user's name, destination, vehicle class and correct fee. The vehicle types along with their associated vehicle class are listed below: Class 1 Vehicle Car Jeepney Van Pickup Motorcycle Class 2 Vehicle Bus Truck Class 3 Vehicle Tanker Trailer Your application will initially ask for the following information when it is started: The name of the user The destination of the user The type of vehicle for the user The application will assign specific fees depending on the class of vehicle that is…arrow_forwardJava Write a program that allows a user to enter three words, and display the appropriate three-letter acronym in all uppercase letters. If the user enters more than three words, ignore the extra words.arrow_forwardJava Programming A bakery company provides a bonus of a new bakery product package for customers who buy at least 10 breads in the company anniversary award which will be celebrated in the next three months. To get the bonus, the customer is given the opportunity three times to guess a number determined by the application from numbers 1 to 20. For each guess number given by the customer, the application will respond as follows:• If the guessed number is smaller than the lucky number, you will see the words "Bigger Number"• If the guessed number is greater than the lucky number, you will see the words "Smaller Number"• If the guessed number is the same as a lucky number, it will match the words "Congratulations ... you found a LUCKY number"As part of the company's IT team, you serve to create a lucky number guessing game console.A. Determine the inputs and outputs of the design programb. Draw a Flowchart of the programc. Write Coding to make the applicationd. Give Screen shoot the…arrow_forward
- Java programming language. Write a program that checks the number entered by the user, whether it is a prime number or not, and prints it using logical sentencesarrow_forwardJava Programming - Create a program List a menu of 10 food combos with the price for a restaurant/store for a customer Give the user the option to select zero or more items from the menu Once the user is done ordering, display a list of all the items ordered and a total of the price of items ordered Calculate tax based on the taxation rate in NY Display the total cost including taxarrow_forwardDevelop a program that allows the user to enter a start value of 1 to 4, a stop value of 5 to 12 and a multiplier of 2 to 8. The program must display a multiplication table with results using these values. For example, if the user enters a start value of 3, a stop value of 7 and a multiplier value of 3, the table should be displayed as follows: Multiplication Table 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 additionally Each multiplication problem must be displayed with a problem number. The program must prompt the user to enter an answer to each of the multiplication problems. The correct answer should be displayed after the user enters an answer. A message should be displayed informing the user that the answer entered was correct or incorrect followed by an appropriate motivating comment. A running record of the number of correct and incorrect responses must be kept. After all the problems have been presented the user must be informed of his/her performance; number of…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage