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
Mrrafil [7]
3 years ago
10

Write a java program that accepts the ingredients for a recipe in cups and converts to ounces

Computers and Technology
1 answer:
Tanzania [10]3 years ago
6 0

Answer:

Explanation:

public static int cupsToOunces (int cups) {

   

       int ounces = cups * 8;

       return ounces;

       

   }

This is a very simple Java method that takes in the number of cups in the recipe as a parameter, converts it to ounces, and then returns the number of ounces. It is very simple since 1 cup is equal to 8 ounces, therefore it simply takes the cups and multiplies it by 8 and saves that value in an int variable called ounces.

You might be interested in
How do you install an operating system?<br><br> Answer with full sentences
denis23 [38]

Answer:

On Windows. Insert the installation disk or flash drive. Restart your computer. Wait for the computer's first startup screen to appear. Press and hold Del or F2 to enter the BIOS page. Locate the "Boot Order" section. Select the location from which you want to start your computer.

Explanation:

6 0
3 years ago
What is the difference between (IF instructions &amp; WHILE instructions )<br> 0<br> 를 들<br> T<br> !
lara31 [8.8K]

Answer:

While statements determine whether a statement is true or false. If what’s stated is true, then the program runs the statement and returns to the first step. If what’s stated is false, the program exits the while and goes to the next statement. An added step to while statements is turning them into continuous loops. If you don’t change the value so that the condition is never false, the while statement becomes an infinite loop.

If statements are the simplest form of conditional statements, statements that allow us to check conditions and change behavior/output accordingly. The part of the statement following the if is called the condition. If the condition is true, the instruction in the statement runs. If the condition is not true, it does not. The if statements are also compound statements. They have a header (if x) followed by an indented statement (an instruction to be followed is x is true). There is no limit to the number of these indented statements, but there must be at least one.

7 0
2 years ago
patty works at Mcdonald's as a chef. it is her job to make hamburgers as each order arrives on her computer screen. one day patt
il63 [147K]
Angela should make sure the hamburger patty is disposed of and a new one prepared for the hamburger. She should reprimand Patty as what she did is wrong. Patty could well be fired for what she did. It is unsafe and unsanitary to give a customer food that has fallen on the floor. Angela should make sure this never happens again.

4 0
2 years ago
Read 2 more answers
1.Write a Java program to solve the following problem using modularity. Write a method that rotates a one-dimensional array with
Westkost [7]

Answer:

Explanation:

The following code is written in Java and it asks the user for the size of the array. Then it randomly populates the array and prints it. Next, it rotates all the elements to the right by 1 and prints the new rotated array.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Random;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Random r = new Random();

       Scanner in = new Scanner(System.in);

       System.out.println("Enter Size of the Array: ");

       int arraySize = in.nextInt();

       ArrayList<Integer> myList = new ArrayList<>();

       for (int x = 0; x < arraySize; x++) {

           myList.add(r.nextInt(15));

       }

       System.out.println("List Before Rotation : " + Arrays.toString(myList.toArray()));

       for (int i = 0; i < 1; i++) {

           int temp = myList.get(myList.size()-1);

           for (int j = myList.size()-1; j > 0; j--) {

               myList.set(j, myList.get(j - 1));

           }

           myList.set(0, temp);

       }

       System.out.println("List After Rotation :  " + Arrays.toString(myList.toArray()));

   }

}

6 0
2 years ago
8. Explain what the following spredications of a monitor refer to their significance for the user and how
Maslowich

Answer:

A computer monitor is an output device that displays information in pictorial form. A monitor usually comprises the visual display, circuitry, casing, and power supply. The display device in modern monitors is typically a thin film transistor liquid crystal display (TFT-LCD) with LED backlighting having replaced cold-cathode fluorescent lamp (CCFL) backlighting. Previous monitors used a cathode ray tube (CRT). Monitors are connected to the computer via VGA, Digital Visual Interface (DVI), HDMI, DisplayPort, USB-C, low-voltage differential signaling (LVDS) or other proprietary connectors and signals.

Originally, computer monitors were used for data processing while television sets were used for entertainment. From the 1980s onwards, computers (and their monitors) have been used for both data processing and entertainment, while televisions have implemented some computer functionality. The common aspect ratio of televisions, and computer monitors, has changed from 4:3 to 16:10, to 16:9.

Modern computer monitors are easily interchangeable with conventional television sets and vice versa. However, as computer monitors do not necessarily include integrated speakers nor TV tuners (such as Digital television adapters), it may not be possible to use a computer monitor as a TV set without external components.[1]

History

Early electronic computers were fitted with a panel of light bulbs where the state of each particular bulb would indicate the on/off state of a particular register bit inside the computer. This allowed the engineers operating the computer to monitor the internal state of the machine, so this panel of lights came to be known as the 'monitor'. As early monitors were only capable of displaying a very limited amount of information and were very transient, they were rarely considered for program output. Instead, a line printer was the primary output device, while the monitor was limited to keeping track of the program's operation.[2]

Computer monitors were formerly known as visual display units (VDU), but this term had mostly fallen out of use by the 1990s.

Technologies

Further information: Comparison of CRT, LCD, Plasma, and OLED and History of display technology

Multiple technologies have been used for computer monitors. Until the 21st century most used cathode ray tubes but they have largely been superseded by LCD monitors.

Cathode ray tube

Main article: Cathode ray tube

The first computer monitors used cathode ray tubes (CRTs). Prior to the advent of home computers in the late 1970s, it was common for a video display terminal (VDT) using a CRT to be physically integrated with a keyboard and other components of the system in a single large chassis. The display was monochrome and far less sharp and detailed than on a modern flat-panel monitor, necessitating the use of relatively large text and severely limiting the amount of information that could be displayed at one time. High-resolution CRT displays were developed for the specialized military, industrial and scientific applications but they were far too costly for general use.

Some of the earliest home computers (such as the TRS-80 and Commodore PET) were limited to monochrome CRT displays, but color display capability was already a standard feature of the pioneering Apple II, introduced in 1977, and the speciality of the more graphically sophisticated Atari 800, introduced in 1979. Either computer could be connected to the antenna terminals of an ordinary color TV set or used with a purpose-made CRT color monitor for optimum resolution and color quality. Lagging several years behind, in 1981 IBM introduced the Color Graphics Adapter, which could display four colors with a resolution of 320 × 200 pixels, or it could produce 640 × 200 pixels with two colors. In 1984 IBM introduced the Enhanced Graphics Adapter which was capable of producing 16 colors and had a resolution of 640 × 350.[3]

By the end of the 1980s color CRT monitors that could clearly display 1024 × 768 pixels were widely available and increasingly affordable. During the following decade, maximum display resolutions gradually increased and prices continued to fall. CRT technology remained dominant in the PC monitor market into the new millennium partly because it was cheaper to produce and offered to view angles close to 180°.[4] CRTs still offer some image quality advantages[clarification needed] over LCDs but improvements to the latter have made them much less obvious. The dynamic range of early LCD panels was very poor, and although text and other motionless graphics were sharper than on a CRT, an LCD characteristic known as pixel lag caused moving graphics to appear noticeably smeared and blurry.

Explanation:

8 0
2 years ago
Other questions:
  • Is a network traffic management device used to connect different network segments together?
    9·1 answer
  • You disassemble and reassemble a desktop computer. when you first turn it on, you see no lights and hear no sounds. nothing appe
    11·2 answers
  • What does limited access to a document mean?
    12·2 answers
  • Help!!!! ASAP TIMED TEST 50 points!!!!
    7·1 answer
  • What lets you do many things, like write book reports and stories?
    15·1 answer
  • Because it allows their files to be accessed from any device on the Internet, many users like to back-up their files using ___ s
    14·1 answer
  • &gt;What is the output of the following code:
    5·1 answer
  • Pls help I don’t know the answers
    15·1 answer
  • Please respond not with answer but with comment.
    12·1 answer
  • PLEASE HELP!!! Me turn this into a video &amp; add liana flores- raise the moon (instrumental) in the background for the music.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!