1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tangare [24]
2 years ago
9

In Java please,

Computers and Technology
1 answer:
Bogdan [553]2 years ago
8 0

Answer:

  1. import java.util.Scanner;
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        Scanner input = new Scanner(System.in);
  5.        System.out.print("Enter meal total: $");
  6.        double meal = input.nextDouble();
  7.        double finalAmount = meal + meal *0.09;
  8.        if(finalAmount * 0.15 > 8){
  9.            finalAmount = finalAmount + 8;
  10.        }else{
  11.            finalAmount = finalAmount + finalAmount * 0.15;
  12.        }
  13.        System.out.println("Final amount: $" + finalAmount);
  14.    }
  15. }

Explanation:

Firstly, create a Scanner object and print user to input total meal (Line 5-7). Next, add the 9% tax to the meal total (Line 8). Use an if statement to check if the finalAmount multiplied by the 15% of tips is bigger than 8 (Line 10), if so, only add 8 to the final amount (Line 11). If not, add 15% tips to final amount (Line 12). At last, print out the final amount (Line 15).

You might be interested in
What is the difference between computer architecture and computer organization?
alukav5142 [94]
The distinction between "computer architecture" and "computer organization" has become very fuzzy, if no completely confused or unusable. Computer architecture was essentially a contract with software stating unambiguously what the hardware does. The architecture was essentially a set of statements of the form "If you execute this instruction (or get an interrupt, etc.), then that is what happens. Computer organization, then, was a usually high-level description of the logic, memory, etc, used to implement that contract: These registers, those data paths, this connection to memory, etc. Programs written to run on a particular computer architecture should always run correctly on that architecture no matter what computer organization (implementation) is used. For example, both Intel and AMD processors have the same X86 architecture, but how the two companies implement that architecture (their computer organizations) is usually very different. The same programs run correctly on both, because the architecture is the same, but they may run at different speeds, because the organizations are different. Likewise, the many companies implementing MIPS, or ARM, or other processors are providing the same architecture - the same programs run correctly on all of them - but have very different high - level organizations inside them.
8 0
3 years ago
Read 2 more answers
Ximena noticed that Sofia had created a network bridge on her new laptop between the unsecured wireless network and the organiza
ratelena [41]

Answer:

A bridge could permit access to the secure wired network from the unsecured wireless network

Explanation:

A bridge is connecting device in networking that connects two different network devices. This device is suitable to connect a secure network with an unsecured network.

8 0
3 years ago
A computer essentially takes input, processes it, and produces output. Which person developed a machine in the mid-1880s that ac
MakcuM [25]

Answer:

The answer to this question is given below in the explanation section. the correct answer is Herman Hollerith.

Explanation:

Charles Babbage (incorrect)

Charles Babbage considers the father of the digital computer. He was a mathematician, philosopher, inventor, and mechanical engineer, Babbage originated the concept of a digital programmable computer. But he died on 18 1, 1871. so, this option is not correct.

John William Mauchly (Incorrect)

John William Mauchly was an American physicist who, along with J. Presper Eckert, designed ENIAC, the first general purpose electronic digital computer, as well as EDVAC, BINAC and UNIVAC I, the first commercial computer made in the United States. But John William Mauchy born on August 30, 1907 and died on January 8, 1980. So, this option is not correct.

Sir John Ambrose Fleming (Incorrect)

Sir John Ambrose Fleming was an English electrical engineer and physicist who invented the first thermionic valve or vacuum tube, designed the radio transmitter with which the first transatlantic radio transmission was made, and also established the right-hand rule used in physics.

Herman Hollerith (correct)      

Herman Hollerith was an American businessman, inventor, and statistician who developed an electromechanical tabulating machine for punched cards to assist in summarizing information and, later, in accounting. This machine is patented in 1884.

7 0
3 years ago
Help please<br> helpp im begging
NemiM [27]
I think That it is A
6 0
2 years ago
What's an array in computer science
muminat

Answer:

An array is a series of memory locations – or 'boxes' – each of which holds a single item of data, but with each box sharing the same name. All data in an array must be of the same data type.

6 0
3 years ago
Other questions:
  • To move to the bottom of a document window, press the ____ key(s). ALT CTRL PAGE DOWN CTRL PAGE DOWN ALT PAGE DOWN PAGE DOWN
    11·1 answer
  • You are configuring a wireless network with two wireless access points. Both access points connect to the same wired network. Yo
    10·2 answers
  • Please check my answer! (Java)
    13·1 answer
  • Which type of microphone uses two metal plates?
    7·1 answer
  • The Internet acts as a(n) blank services such as The World Wide Web and email
    6·2 answers
  • What are some direct access devices
    15·1 answer
  • Draw a conceptual sketch of your laptop. Identify the keyboard, screen, power source, and storage device and etc. using arrows a
    8·1 answer
  • An end-user license agreement protects _____.
    11·1 answer
  • Write the pseudocode for a program that will process attendance records of CA students. The students attend college five days a
    13·1 answer
  • Why are salaried employees often excluded from overtime pay
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!