Big Java Late Objects
2nd Edition
ISBN: 9781119330455
Author: Horstmann
Publisher: WILEY
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 1, Problem 18RE
Write pseudocode for an
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
QUICK-BASIC64
In a 50-person class, students with grades below 70 are considered unsuccessful. Write an algorithm that calculates students who
fail the exam. (Please explain everything the program in details and please check whether the program runs or not by using q-
basic64. Thank you so much)
HELP NEEDED ASAP!
Language: JAVA
Write a program in Java that takes an integer value as input from the keyboard and prints a pattern like a right-angle triangle with the line number. For input value 4 the pattern is as follows:
1
22
333
4444
Hint: use nested loops.
QuadraticAA.java
Write a program that solves quadratic equations of the form , where The values A, B, and C will be real numbers (doubles) that you will request from the user. The equation below is what is used to solve for . Remember, there will be two solutions for x (not necessarily distinct). No loops are necessary, so don’t include any.
To find the two solutions for this equation, you will use the quadratic formula:
Remember that it must be solved for both the and :
You will ask the user to input a value for A, B, and C (in that order, using those same letters), then you will use those values to find the two values of x as above. Your output MUST then display the original quadratic equation back to the user with their coefficients in place, and then output the two results. We will assume that the user will not put zero for A.
*Format ALL OUTPUT VALUES (including the equation) to have only two decimal places.
There is a test case below. Your program should run the…
Chapter 1 Solutions
Big Java Late Objects
Ch. 1.1 - What is required to play music on a computer?Ch. 1.1 - Why is a CD player less flexible than a computer?Ch. 1.1 - What does a computer user need to know about...Ch. 1.2 - Prob. 4SCCh. 1.2 - Which part of the computer carries out arithmetic...Ch. 1.2 - A modern smartphone is a computer, comparable to a...Ch. 1.3 - What are the two most important benefits of the...Ch. 1.3 - Prob. 8SCCh. 1.4 - Prob. 9SCCh. 1.4 - Prob. 10SC
Ch. 1.5 - How do you modify the HelloPrinter program to...Ch. 1.5 - How would you modify the HelloPrinter program to...Ch. 1.5 - Would the program continue to work if you replaced...Ch. 1.5 - What does the following set of statements print?...Ch. 1.5 - What do the following statements print?...Ch. 1.6 - Suppose you omit the "" characters around Hello,...Ch. 1.6 - Suppose you change println to Printline in the...Ch. 1.6 - Suppose you change main to hello in the...Ch. 1.6 - Prob. 19SCCh. 1.6 - Prob. 20SCCh. 1.7 - Prob. 21SCCh. 1.7 - Suppose your cell phone carrier charges you 29.95...Ch. 1.7 - Consider the following pseudocode for finding the...Ch. 1.7 - Suppose each photo in Self Check 23 had a price...Ch. 1.7 - Prob. 25SCCh. 1.7 - Prob. 26SCCh. 1 - Explain the difference between using a computer...Ch. 1 - Prob. 2RECh. 1 - Prob. 3RECh. 1 - Prob. 4RECh. 1 - Prob. 5RECh. 1 - Prob. 6RECh. 1 - What does this program print? public class Test {...Ch. 1 - What does this program print? Pay close attention...Ch. 1 - Prob. 9RECh. 1 - Write three versions of the HelloPrinter.java...Ch. 1 - How do you discover syntax errors? How do you...Ch. 1 - The cafeteria offers a discount card for sale that...Ch. 1 - Write an algorithm to settle the following...Ch. 1 - Consider the question in Exercise R1.13. Suppose...Ch. 1 - In order to estimate the cost of painting a house,...Ch. 1 - In How To 1.1, you made assumptions about the...Ch. 1 - Suppose you put your younger brother in charge of...Ch. 1 - Write pseudocode for an algorithm that describes...Ch. 1 - The ancient Babylonians had an algorithm for...Ch. 1 - Write a program that prints a greeting of your...Ch. 1 - Write a program that prints the sum of the first...Ch. 1 - Write a program that prints the product of the...Ch. 1 - Write a program that prints the balance of an...Ch. 1 - Write a program that displays your name inside a...Ch. 1 - Write a program that prints your name in large...Ch. 1 - Write a program that prints your name in Morse...Ch. 1 - Write a program that prints a face similar to (but...Ch. 1 - Write a program that prints an imitation of a Piet...Ch. 1 - Write a program that prints a house that looks...Ch. 1 - Write a program that prints an animal speaking a...Ch. 1 - Write a program that prints three items, such as...Ch. 1 - Write a program that prints a poem of your choice....Ch. 1 - Write a program that prints the United States...Ch. 1 - Type in and run the following program. Then modify...Ch. 1 - Type in and run the following program. Then modify...Ch. 1 - Modify the program from Exercise E1.16 so that the...Ch. 1 - Prob. 18PECh. 1 - Write a program that prints a two-column list of...Ch. 1 - In the United States there is no federal sales...Ch. 1 - To speak more than one language is a valuable...Ch. 1 - You want to decide whether you should drive your...Ch. 1 - You want to find out which fraction of your cars...Ch. 1 - The value of can be computed according to the...Ch. 1 - Imagine that you and a number of friends go to a...Ch. 1 - Write an algorithm to create a tile pattern...Ch. 1 - Write an algorithm that allows a robot to mow a...Ch. 1 - Consider a robot that is placed in a room. The...Ch. 1 - Consider a robot that has been placed in a maze....Ch. 1 - Suppose you received a loyalty promotion that lets...Ch. 1 - A television manufacturer advertises that a...Ch. 1 - Cameras today can correct red eye problems caused...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Describe four uses of a primary key.
Database Concepts (8th Edition)
The _______ member function moves a files read position to a specified byte in the file.
Starting Out with C++: Early Objects (9th Edition)
State whether each of the following is true or false. A selection statement repeats an action while a condition...
Java How To Program (Early Objects)
Design an algorithm that counts the number of digits that appear in the String variable str.
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
5.5 Describe the four basic elements of counter-controlled iteration.
C++ How to Program (10th Edition)
Big data Big data describes datasets with huge volumes that are beyond the ability of typical database manageme...
Management Information Systems: Managing The Digital Firm (16th Edition)
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
- Calculator Challange Python Coding Create a simple calculator that takes in TWO numbers from the user and then asks the user to select if they want to ADD, SUBTRACT, MULTIPLY or DIVIDE to get the answer. I have coded... print("input whole numbers please, no decimals")again=""while again!="N":first=int(input("What is the first number?"))last=int(input("What is the last number?"))#let user pick the operation, assign numbers to the operationsoperation=int(input("Would you like to 1) add, 2)subtract, 3)multiply, or 4) divide?"))if operation==1:answer=first+lastelif operation==2:answer=first-lastelif operation ==3:answer=first*lastelif operation == 4:answer=first/lastelse:print("You did something wrong, try again.")print("The answer: %s"%(answer))again=str(input("Would you like to go again? Y/N")).upper()same=str(input("Would you like to use the same two numbers? Y/N")).upper()while same=="Y":operation = int(input("Would you like to 1) add, 2)subtract, 3)multiply, or 4) divide?"))if…arrow_forwardPseudocode for Java programarrow_forwardCompare Numbers - Python Language please! Programming challenge description: Little Tommy is in kindergarten on the first day of class. His teacher has taught him about inequalities today, and he is learning how to draw crocodiles to represent them. When there are two numbers, A and B, there are three options:1. If A is greater than B, then draw '>'. The crocodile's mouth is pointed toward the bigger number, A.2. If A is less than B, then draw '<'. The crocodile faces B.3. If A is equal to B, draw '='. The crocodile is confused and keeps its mouth shut.Unfortunately, Tommy does not like to do his homework, and has bribed you to write a program to do it for him. Input: The input consists of two integers A and B on a line, separated by a space. |A,B| < 2^63. Output: Print a line containing the appropriate symbol that describes the relationship between the numbers. Test 1 Test InputDownload Test 1 Input 35 40 Expected OutputDownload Test 1 Output <arrow_forward
- Java Calculating the User's Sum Write a complete program that reads in numbers and calculates the sum of the numbers in that range. Code Specifications In the main method, read input from the user. Read in two integers from the user: a lower end of the range and an upper end of the range. Check if the numbers are valid: the lower number cannot be greater than the upper number. If the numbers are invalid, use a loop to ask for new numbers. Continue looping until you get two valid values. Write a method called calculateTheSum. The method takes in a lower and upper end of the range. The method calculates the sum of all values from lower (inclusive) to upper (inclusive). Invoke the method from main the output the result. Test Cases I recommend testing your code using the test cases below. I've listed the user inputs along with a sample of the result. User Inputs Result lower = 10, upper = 1 the program should ask for new input lower = 5, upper = -5 the program should ask…arrow_forwardواجب دراسي1 اكتب خوارزمية ورسم المخط ط الانسيابي لحساب مساحة عد د من الدوائر نصف القطر يبدا من 1 الى 20 Home work1: Write an algorithm and draw flow chart to calculate the area of a number of circles with radius from 1 to 20 A=pie*R?arrow_forwardPythonarrow_forward
- Basic Computer Programming ActivityLanguage: CShow the code and how it works thanksarrow_forwardThis example creates a program to teach a first grade child how to learn subtractions. The program randomly generates two single- digit integers number1 and number2 with number1 > number2 and displays a question such as "What is 9 – 2?" to the student. After the student types the answer, the program displays a message to indicate whether the answer is correct.arrow_forwardPython Algorithm Question (similar to celebrity Python problem). Having trouble implementing the algorithm. Here's the question: Let’s say you’re going to invite some people to a party. You’re considering n friends, but you knowthat they will only have a good time if each of them knows at least k others at the party. (Assume that if A knows B, then B automatically knows A.) Solve your problem by designing an algorithm for finding the largest possible subset of your friends where everyone knows at least k of the others, if such a subset exists. To help you get started I’ve made a graph of “my friends”: G={'Rachel':['Ross','Monica'], 'Ross':['Rachel','Monica'], 'Monica':['Rachel','Ross'], 'Jon Snow':['Daenerys','Sansa','Arya'], 'Daenerys':['Jon Snow','Sansa','Arya','Khal Drogo'], 'Sansa':['Jon Snow','Daenerys','Arya'], 'Arya':['Jon Snow','Daenerys','Sansa'], 'Khal Drogo':['Daenerys'], 'Cersei':['Jaime'], 'Jaime':['Cersei'], 'Bart':['Milhouse'], 'Milhouse':['Bart','Lisa'],…arrow_forward
- 1- Write a java program that asks the user to type a positive number n and prints the sum of odd numbers using while loop: 1+3+5+7...+(2n-1). Example: If the input is 4, then the program will print 16 ?arrow_forwardPython programming: A robot moves in a plane starting from the original point (0,0). The robot can move toward UP, DOWN, LEFT and RIGHT with a given steps. The trace of robot movement is shown as the following: UP 5 DOWN B LEFT B RIGHT 2 i The numbers after the direction are steps. Please write a program to compute the distance from current position after a sequence of movement and original point. If the distance is a float, then just print the nearest integer. Example: If the following tuples are given as input to the program: UP 5 DOWN 3 LEFT 3 RIGHT 2 Then, the output of the program should be: 2 Hints: In case of input data being supplied to the question, it should be assumed to be a console input.arrow_forward(Computation) A magic square is a square of numbers with N rows and N columns, in which each integer value from 1 to (N * N) appears exactly once, and the sum of each column, each row, and each diagonal is the same value. For example, Figure 7.21 shows a magic square in which N=3, and the sum of the rows, columns, and diagonals is 15. Write a program that constructs and displays a magic square for a given odd number N. This is the algorithm:arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY