Java Programming, Loose-leaf Version
8th Edition
ISBN: 9781337685917
Author: Joyce 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
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,…
Write a short Java program
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.
Chapter 7 Solutions
Java Programming, Loose-leaf Version
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
- Object-Oriented Programming ❤❤❤ Matchmaker with Java ❤❤❤ Summary: Create a Java application that will determine your true love. Prerequisites: Java, VS Code, and Terminal In this assignment you will develop and test a command-line application written in the Java language that asks questions to determine if a person is your true love. More specifically your application should ask five questions in the form of statements and allow the user to respond to each statement with the numbers 1 through 5 with 1 indicating strongly disagree and 5 indicating strongly agree. You will then compare the person’s answers with your desired “true love” answers. The closer the answers are to your desired “true love” answers the better match the two of you are for each other. For example, suppose you choose the statement “Broccoli is delicious.” and your desired answer was 1 (strongly disagree) because you really don’t like broccoli. If the application user entered 4 (agree), then the two of you would not…arrow_forwardONLY IN JAVA. Create a Java program that you can play the game "More or Less, Less is More."Rules of the game:The two-dimensional field of the game must be m x n in size (game field). The buttons that make up the game field each have a number assigned to them.beginning of the game:The target value is shown above the game field. The numbers on the buttons of the game field are set to a random digit between 0 and 9.• Below the game field, you may read the current sum of the numbers displayed on the buttons.• Above the playing field in the upper right corner is a display of the remaining movements.Playing: The player chooses their first move by clicking any button (button A) on the playing area.1. The player has the option to select a second button (button B) that is situated in the same row or column as the first button they chose (A).2. When button (A) is clicked, value is changed in accordance with the following formula: (AoperationB)mod10 equals A.3. The basic game's operation will be…arrow_forwardJava - Name Formatarrow_forward
- ShowCurrentTime.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_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
- In C# language using Microsoft Visual Studio in Windows Forms App (.NET Framework) A slot machine is a gambling device that the user inserts money into and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money, which the slot machine dispenses back to the user. Design a program that simulates a slot machine. When the program runs, it should do the following: Ask the user to enter the amount of money he or she wants to insert into the slot machine. Create an application that simulates a slot machine. The application should let the user enter into a TextBox the amount of money he or she is inserting into the machine. When the user clicks the Spin button, the application should display three randomly selected symbols. (Slot machines traditionally display fruit symbols.arrow_forwardYou 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_forwardPlease answer this question in Java language with a screenshot of the output and .java filearrow_forward
- Java coding platformarrow_forwardControl structures: In Java only please. Output the position of the largest number and the largest number in the squence a0, a1, a2....ak. For example, the largest number of the squence is 75, 226, 113, 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2, 1 is 340, and it's position is 4. Test your program for the following values of x: 75, 111, 678, 732, 873, 2048, and 65535. Thank youarrow_forwardJava programming Computer science My DOB is 15 my MOB is 7 Please please help me Im desperate for your help please? I really need this, please. I don't understand it that mucharrow_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