96.3k views
5 votes
Your app needs to store the following information. For each type of information, decide whether you would use an array or a variable to store it:(a) All the messages a user has sent(b) The highest score a user has ever reached on the app(c) A username and password to unlock the app

User Kshahar
by
4.0k points

1 Answer

1 vote

Answer:

Array: (a) All the messages a user has sent.

Variable: (b) The highest score a use has reached on the app. (c) A username and password to unlock the app.

Step-by-step explanation:

An array generally has more than one value whereas a variable can only contain a single value at any particular point in time. In addition, a variable has a limit whereas an array does not have any maximum limit. Therefore, it can be concluded that option (a) will be stored as an array while options (b) and (c) will be stored as variables.

User Felixphew
by
4.4k points