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
Mice21 [21]
2 years ago
11

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

me 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. cart total + 1.c. cart total = cartTotal +1.d. var cart total = cartTotal + 1.e. var cart total + 1.
Computers and Technology
1 answer:
Gemiola [76]2 years ago
6 0

Answer:

b. cart total + 1

Explanation:

A. cart total=1 do increment the total with every 1 click here, it only 're-assigns cart total with value 1 for every click, hence it's always 1.

B. In every click, 1 is always added to the previous value of cart total, like addItemButton(cart total+1) or so.

C. This would have worked too if "cart total" and "cartTotal" where of same type.

D. cart total is just being initially defined here.

E. Likewise here, var shows that cart total has just only been declared.

You might be interested in
The following are reasons why many organizations are trying to reduce and right-size their information foot-print by using data
blagie [28]

Answer:

C.<em> improve data quality and reduce redundancies, reduce increased and staggering storage management costs</em>

<em></em>

Explanation:

Excess data retention can lead to retention of redundant and irrelevant data, which can reduce data handling and processing efficiency, while at the same time increasing the cost of data storage and management. This can be curbed be reducing data to the right size by using data governance techniques like data cleansing and de-duplication

6 0
3 years ago
A city government is attempting to reduce the digital divide between groups with differing access to computing and the Internet.
sergeinik [125]

Answer:

C

Explanation:

Putting all government forms on the city web site is the least activity likely to be effective in the purpose of reducing digital divide.

Holding basic computer classes at the community centers will very much help to reduce the digital divide.

Providing free wireless internet connections at locations in low-income neighborhood will also reduce the gap of digital divide

Requiring that every city school has computers that meet a minimum hardware and software will made computing resources available to users thereby reducing digital divide.

5 0
2 years ago
Keyword stuffing is considered to be a black hat technique for SEO and is highly suggested today by Google.
klemol [59]

Answer:

False

Explanation:

Keyword stuffing is a practice to insert an unusual large number of tag in a website to increase the page ranking in search results. This is considered an unethical Search Engine Optimization (SEO).

Google consider Keyword stuffing as unethical and it doesn't help to boost the rank of a website. More advanced algorithms are being used to filter those of the meta tags which are irrelevant or excessively out of context in a website.

3 0
3 years ago
Explain the concepts o f polymorphism, Encapsulation, Inheritance in detail with suitable examples?
levacccp [35]

Answer:

Encapsulation:-It is the binding of the data and functions so that they works as one unit.

Inheritance:-When one class acquires the property of another class it is called inheritance.

Polymorphism :-It generally means more than one form

Explanation:

Encapsulation:- class is an example of encapsulation it can hold different data types and functions in a single container called class.

class Name{

public:

string first_name;

string last_name;

void Display()

{

cout<<first_name<<" "<<last_name<<endl;

}

};

Inheritance:-The property of a class acquiring the properties of another class is called inheritance.

Now we will inherit the above defined class.

class person: public Name

{

public:

char gender;

int age;

void Display()

{

cout<<first_name<<" "<<last_name<<gender<<age<<endl;

}

};

int main()

{

Name n;

person p;

n.Display();

p.Display();

}

Polymorphism- There are two types of polymorphism:-

1.Run time polymorphism=The values are decided at run time.

2.Compile time polymorphism=The values are decided at compile time.

Example:-In the above example we have function Display() in both the classes.This is an example of compile-time polymorphism. We are deciding at the time of compilation which display to use.

8 0
3 years ago
Provide a brief, high-level description of how the Internet’s connection-oriented service provides reliable transport.
mario62 [17]

Answer:

  Connection-oriented is the method which is implemented in the transport and data link layer. It is basically depend upon the physical connection in the network system.

Transmission control protocol (TCP) is the connection oriented and user datagram protocol (UDP) is the connection less network transport layer. The TCP and UDP both are operate in the internet protocol (IP).

It basically require connection and it can be establish before sending data. This is also known as reliable network connection service. The connection oriented service establish connection between the different connection terminal before sending any data or information. It can easily handle traffic efficiently.

7 0
3 years ago
Other questions:
  • A) What is the maximum value that can be represented as an unsigned n-bit binary integer?
    13·1 answer
  • Why is it important to not get distracted while driving?
    13·2 answers
  • Which of the following is an example of hypertext pattern reading?
    13·1 answer
  • Which of the below statements describes the purpose of HTML 5 - check as many as apply
    9·1 answer
  • the technique of blocking some parts of a photograph to emphasize (or draw attention to) another part of the same photograph is
    8·1 answer
  • Can someone that been helping me answer one more question for please and thx
    13·1 answer
  • If you want to present slides to fellow students or coworkers which productivity software should you use to create them A. Word
    14·2 answers
  • A good way to assess your CPU usage is to:_______.
    13·1 answer
  • One of your start-ups uses error-correcting codes, which can recover the original message as long as at least 1000 packets are r
    8·1 answer
  • When would it be appropriate to run MS Office or Adobe on the Windows OS server ?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!