Mindtap Computing, 1 Term (6 Months) Printed Access Card For Farrell’s Java Programming, 8th
8th Edition
ISBN: 9781337091480
Author: Joyce Farrell
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 6, Problem 1RQ
<PROGRAM-DESCRIPTION-ANSWER>
A structure that enables repeated execution of a block of statements is called as a “Loop”.
Hence, the correct answer is option “C”.
</PROGRAM-DESCRIPTION-ANSWER>
Explanation of Solution
Loop:
- A loop is referred to as a structure that enables repeated execution of a block of statements.
- A Boolean expression is evaluated within a looping structure.
- If the Boolean expression is true, then a block of statements known as the loop body is executed and the Boolean expression is evaluated again.
- The loop ends when the Boolean expression becomes false.
- The loop body can either be a single statement or a block of statements written between curly braces.
- The execution of any loop once is known as an iteration.
Want to see more full solutions like this?
Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
A. The regular expression/\b\$\d+/gwill match words beginning with a dollar sign and one or more digits, such as"$5"or"$500".
Select one:
True
False
B. Given that you can calculate the circumference of a circle by multiplying its diameter times pi, in JavaScript you can use the statement
circumference = d * Math.PI;to calculate the circumference of a circle with the diameterd.
Select one:
True
False
Monthly Payment Program (in the attached photo), update it with the following in java code:
If applicable, remove hard coding for the principal, annual interest rate and number of years. Replace these with Input Dialog Boxes requesting data be entered.
The calculation should remain the same.
Replace the output area with a showMessage box.
Allow the user to request a detailed display of the payment schedule. This will include the ending balance and interest paid per month in a line-by-line display.
Add a loop to the program allowing the user to continue entering new data as many times as they like (all input and output should be displayed in dialog boxes).
In PyCharm, write a program that prompts the user for their name and age. Your program should then tell the user the year they were born. Here is a sample execution of the program with the user input in bold:
What is your name? Amanda How old are you? 15 Hello Amanda! You were born in 2005.
Hello Amanda! You were born in 2005.
Write the program. Format your code using best practices. Refer to the zyBooks style guide, if needed, to use proper naming conventions for variables and methods. Use the most appropriate statements with minimal extraneous elements, steps, or procedures.
Run the program.
Debug the program. Be sure your code produces the correct results.
Save and submit your file.
Chapter 6 Solutions
Mindtap Computing, 1 Term (6 Months) Printed Access Card For Farrell’s Java Programming, 8th
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
- In Chapter 4, you created a program that generates a random number, allows a user to guess it, and displays a message indicating whether the guess is too low, too high, or correct. Now, create a modified program called GuessingGame2 in which the user can continue to enter values until the correct guess is made. After the user guesses correctly, display the number of guesses made. Recall that you can generate a random number whose value is at least min and less than max using the following statements: Random ranNumber = new Random(); int randomNumber; randomNumber = ranNumber.Next(min, max);arrow_forwardWhat is the output of the following code segment?inte=5,f=10;if(eff0) Write(Red); else Write(Orange); a. Red b. Orange c. RedOrange d. nothingarrow_forwardHello, I am having the most difficult understanding the solution to this problem: It is programming problem number 4 from C# 5th edition Tony Gaddis DRIVER’S LICENSE EXAM The local driver’s license office has asked you to create an application that grades the written portion of the driver’s license exam. The exam has 20 multiple-choice questions. Here are the correct answers: B D A A C A B A C D B C D A D C C B D A Your program should store these correct answers in an array. The program should read the student’s answers for each of the 20 questions from a text file and store the answers in another array. (Create your own text file to test the application.) After the student’s answers have been read from the file, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of correctly answered questions, the total number of incorrectly…arrow_forward
- The Billy Goat Fast-Fast Food restaurant sells the following products: Product Price ($) Cheeseburger 2.49 Pepsi 1.00 Chips 0.59 Design the Python Program for an application that allows a user to enter an ordered item continuously until a sentinel value is entered. After each item, display its price or the message “Sorry, we do not carry that” as output. After all items have been entered, display the total prices for the order.arrow_forwardI wrote this program, but the solution on zybooks didn't let it full credit. It showed: "Tests that FindText() returns 5 for parameters "more" and "We'll continue our quest in space. There will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. Nothing ends here; our hopes and our journeys continue!" Test feedback FindText() incorrectly returns 0." Please help me fix the FindText(). #include <iostream>#include <string>using namespace std; //Function prototypechar PrintMenu(string&);int GetNumOfNonWSCharacters(string);int GetNumOfWords(const string);int FindText(string, string);void ReplaceExclamation(string&);void ShortenSpace(string&); int main() { /* Type your code here. */ //Declare variables char option; string text, phraseToFind; //Get text from user cout << "Enter a sample text:\n"; getline (cin, text); //Print that text…arrow_forwardQuestion: Similarly, what can be displayed from the output of the program? #include<iostream> using namespace std; int main() { int number; cout<<"Enter an integer:"; cin>>number; if(number>0) { cout<<"You entered"<<number<<endl; cout<<"The number is positive"; } else if(number==0) { cout<<"The number is equal to zero"; } else { cout<<"The number is negative"; } return 0; } It determines if a number is either positive, negative, or zero. It determines if a number is zero. None of the above It determines if a number is an integer or floatarrow_forward
- Create a program that prompts the user for an amount less than 100 and then displays the minimum number of coins necessary to make the change. The change can be made up of quarters, dimes, nickles, and penniesarrow_forwardplease can you write a professional comment using the // command for this c++ code thank you #include <iostream>using namespace std; int main (){ char letter; // Place to store input letter int tempIn; // Temperature to be converted int tempOut; // Converted temperature cout << "Input Menu" << endl << endl; cout << "F: Convert from Fahrenheit to Celsius" << endl; cout << "C: Convert from Celsius to Fahrenheit" << endl; cout << "Type a C or an F, then press return." << endl << endl; cout << "Enter your option: "; cin >> letter; // C ,c, f or F { if(letter!='C'||letter!='c'||letter!='F'||letter!='f') cout <<"wrong letter" <<endl; } cout <<"Type an integer number: "; cin >> tempIn; if (letter == 'C') tempOut = (9 * tempIn / 5) + 32; else tempOut = 5 * (tempIn - 32) / 9; cout << endl << endl; cout << "Temperature to…arrow_forwardCreate an application that contains a Java statement or a set of Java statements to accomplish each of the following tasks: Program 2: Print the integers from 5 to 100 incrementing by 5 each iteration. Use a for loop and the counter variable i to iterate through the loop. Print only five integers per line. [Hint: Use a new line counter and an if statement (i.e. if (l > 5) to print out a line return else print out a tab. Assume that this code is an application. Use the System.out.println() method to output the newline character, and use the System.out.print(‘\t’) method to output the tab character.]arrow_forward
- What is the pseudocode for this? Below is the C++ #include <iostream> using namespace std; int main () { int first_opt, area_opt, perimeter_opt, length, width, radius, side, height, base, a, b, c, A_Rect, A_Square, P_Rect, P_Square, P_Triangle; float A_Circle, A_Triangle, P_Circle; cout<<"Welcome!. Choose what you want to solve"<<"\n"; cout<<"1. AREA"<<"\n"; cout<<"2. PERIMETER"<<"\n"; cin>>first_opt; cout<<"Choose from the following"<<"\n"; switch(first_opt) { case 1: cout<<"1. Area of the Rectangle"<<"\n"; cout<<"2. Area of the Circle"<<"\n"; cout<<"3. Area of the Square"<<"\n"; cout<<"4. Area of the Triangle"<<"\n"; cin>>area_opt; switch(area_opt) { case 1: cout<<"Enter length: "<<"\n"; cin>>length; cout<<"Enter width: "<<"\n"; cin>>width; A_Rect = length*width; cout<<"The area of the…arrow_forwardYou can generate a random number between 1 and a limiting value named limit by using a statementsimilar to randomNumber = random(limit). Create the logic for a guessing game in which the application generatesa random number between 1 and 100 and the player tries to guess it. Display a message indicating whether theplayer’s guess was correct, too high, or too low. CASE STUDY RESOURCEHint: You must create a flowchart. Your flowchart must be in a Word document using the shapes, lines, andstatements below. You need to create your own statement() names.Response format: Your response must be in a pseudocode format or flowchart structure as shown below.arrow_forwardThis is the question - 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. This is my code. It is acting like I have to enter the words seperarly which is what I don't think I have to do. import java.util.*; public class ThreeLetterAcronym { public static void main(String[] args) { // Write your code here Scanner myObj = new Scanner(System.in); // Create a Scanner object System.out.println("Enter three words:"); String[] str = new String[3]; String m="";…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY