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
Daniel [21]
3 years ago
6

Jasmine is writing a shopping app. She has created a variable to keep track of the number of items in the shopping cart. Every t

ime someone clicks the "addItemButton", she would like the variable to increase by 1.
What code should Jasmine insert where it says in order for her app to work?a) cart total = 1;
b) cartTotal + 1;
c) cartTotal = cartTotal +1;
d) var cartTotal = cartTotal + 1;
Computers and Technology
1 answer:
Bas_tet [7]3 years ago
8 0

Answer:

C.     carTotal=carTotal + 1;

Explanation:

Option 'c' is the correct answer, because when some click on the "additembutton" the variable cartTotal should increment by 1. As jasmine want to track the record of no. of items in cart, each time customer will click "additembutton" the variable "cartTotal" increment by 1 and also update the value of that variable. e.g

If initially

cartTotal=0

When 1st time additembutton pressed

CartTotal = CartTotal + 1   ==> will make it as   CartTotal=0+1    ==>  CartTotal = 1

Now CartTotal=1;

When customer 2nd time press "additembutton"

CartTotal = CartTotal + 1   ==> will make it as   CartTotal=1+1    ==> CartTotal = 2

This process will continue and update the cartTotal till the customer add items into the cart.

You might be interested in
1. Write a 400-500 word research report about Burke High School.
fenix001 [56]

Answer:

when is it due

Explanation:

6 0
3 years ago
All information that is to be processed by a computer must first be entered into memory via an input device.
Goshia [24]
The answer is true, since it needs to be sent to the main server to be processed
3 0
2 years ago
Transcription in a virus that has an rna genome is complex because __________.
AnnZ [28]
I had to look for the options and here is my answer:

Transcription in a virus that contains an RNA genome is complicated due to the following reasons: the virus has to create a DNA intermediate, the viral genome needs to encode for RNA-dependent RNA polymerase, and lastly, the virus needs to have its own <span>RNA-dependent RNA polymerase.</span>
8 0
3 years ago
Write an application that solicits and inputs three integers from the user and then displays the sum, average, product, smallest
Oksana_A [137]

Answer:

Please find below program

Explanation:

import java.util.Scanner;

public class Tester {

public static void main(String[] args) {

 

 // create an object of scanner class

 Scanner scanner  = new Scanner(System.in);

 

 //prompt user to enter first number

 System.out.println("Enter first integer: ");

 

 // read value from entered by user and keep it in num1

 int num1 = scanner.nextInt();

 

 //prompt user to enter second number

 System.out.println("Enter second integer: ");

 

 // read value from entered by user and keep it in num2

 int num2 = scanner.nextInt();

 

 //prompt user to enter third number

 System.out.println("Enter third integer: ");

 

 // read value from entered by user and keep it in num3

 int num3 = scanner.nextInt();

 //close scanner as we have done with user input

 scanner.close();

 

 //calculate sum

 int sum = num1+num2+num3;

 

 //calculate average

 int average = sum/3;

 

 //calculate product

 int product = num1*num2*num3;

 

 //find out largest number

 int largest = 0;

 if (num1>=num2){

  if(num1>=num3)

   largest = num1;

  else

   largest = num3;

 }else {

  if(num2>=num3)

   largest = num2;

  else

   largest = num3;

 }

 

 // find out smallest number

 int smallest = 0;

 if (num1<=num2){

  if(num1<=num3)

   smallest = num1;

  else

   smallest = num3;

 }else {

  if(num2<=num3)

   smallest = num2;

  else

   smallest = num3;

 }

 

 // print all the information

 System.out.println("Sum of three numbers : "+sum);

 System.out.println("Product of three numbers : "+product);

 System.out.println("Average of three numbers : "+average);

 System.out.println("Smallest number : "+smallest);

 System.out.println("Largest number : "+largest);

}

}

3 0
4 years ago
Does anyone know a way to skip the videos on Edgnuity?
Mazyrski [523]

Answer:

Yes, there is usually a skip button in the corner.

Explanation:

when i have to watch videos on there thats how i skip it

Hope this helps!!

7 0
3 years ago
Other questions:
  • Using the drop-down menus, correctly match the name of the person with the computer-programming
    6·1 answer
  • What types of input and output devices would be ideal for a college student completing his or her coursework?
    8·1 answer
  • Purpose of this program:
    12·1 answer
  • The area between the main content page and the page edges
    9·2 answers
  • Match the elements of a web page with their description
    15·2 answers
  • create your own min function that finds the minimum element in a list and use it in a separate function
    14·1 answer
  • What is Ce stands for?
    8·1 answer
  • Hannah wanted to watch a movie. She typed the movie name on the search engine. In result she found the downloadable link of the
    10·1 answer
  • Identify the two top benefits of using angel investors to start a business.
    6·1 answer
  • Define operating system?explain the types of operating system on the basis of use.​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!