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
Create an array of 7 words,named "temperatures"containing daily temperatures for a week. Temperatures can be positive or negativ
zepelin [54]

Answer:

// program in C++.

// headres

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // array

   int temperatures[7];

   // count variable

   int count=0;

   cout<<"Enter the temperature of all days:";

   for(int a=0;a<7;a++)

   {

       // read temperature of 7 days

       cin>>temperatures[a];

       // find temperature is extreme or not

       if(temperatures[a]<-10||temperatures[a]>25)

       // count

       count++;

   }

   // print count of extreme temperature

   cout<<"number of days of extreme temperature:"<<count<<endl;

return 0;

}

Explanation:

Create an array of size 7 to store the temperature of all days of week.Read the temperature of each day.If the temperature is less than -10 or greater than 25 then increment the count.This will count the number of days of extreme temperature.Print  the count.

Output:

Enter the temperature of all days:-20 12 18 30 32 -15 15                                                                  

number of days of extreme temperature:4

3 0
3 years ago
Mikayla is researching copyright information for images found on a website. She needs to figure out the legal name of the compan
Pie

Answer:

C. Footer

Explanation:

A footer is typically found at the bottom of all web pages and it comprises of information such as disclaimers, copyright, legal which are displayed visibly for all visitors to see.

Generally, a website footer is the direct opposite of a website header in relation to positioning or location; a footer is always found at the bottom while a header is always found at the top of a web page.

Since Mikayla is researching copyright information for the images found on a website, she should access the website footer because it primarily provides information about the legal name of the company that owns the website and information about what country they're located in, as well as links to other relevant resources such as call to action, maps, contact forms, newsletter signup etc.

3 0
2 years ago
Ferestre de navigare
Stells [14]
LOLOLOLOLOLLOLOLOLOLOLOOOLOLOLOOLOLLOLOLOLOLOLO

7 0
2 years ago
What year does futurist ray kurzweil believe ai will meet human intelligence?.
MariettaO [177]

Answer: 2029

Explanation:

3 0
2 years ago
The following numbers are sorted in which way: 10,20,30,40?
Bas_tet [7]

The numbers are sorted by tens

8 0
3 years ago
Read 2 more answers
Other questions:
  • which of the following is not a name of one of the central features of Facebook timeline activity log Graph Search for Daily New
    6·1 answer
  • You are given a class named Clock that has three instance variables: One of type int called hours, another of type boolean calle
    11·1 answer
  • How do you copy and paste plz let me know
    14·2 answers
  • Which attribute defines the file name for the specific image in an image tag??
    13·1 answer
  • Which technique is used to convert a color image to a black and white image?
    12·1 answer
  • Hyper-Tech Enterprises manufactures mechanical parts used in air conditioning and heating units. The company employs over 300 wo
    13·1 answer
  • Write a method named removeRange that accepts an ArrayList of integers and two integer values min and max as parameters and remo
    10·1 answer
  • A collection of wiress connecting the CPU with main memory that is used to identify particular location is called
    13·1 answer
  • Consumers affect which goods and services are produced because they _____.
    7·1 answer
  • What does this comparison block indicate?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!