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
DIA [1.3K]
3 years ago
7

Write a class named grocerylist that represents a list of items to buy from the market. write another class called item that rep

resents a request to purchase a particular item in a given quantity (for example four boxes of cookies). the grocerylist class should use an array field to store items and to keep track of its size (number of the items in the list so far). assume that a grocery list will have no more than 50 items.
Computers and Technology
1 answer:
nataly862011 [7]3 years ago
5 0
Class Item {
// item class attributes
string itemName;
int itemQuantity;
double itemPrice;
...
}

class grocerylist {

// you can use arrays or any other containers like ArrayList, Vectors,...etc depends on programming language you use

Item[50] itemList;
int size;
public grocerylist () {
this.size = 0;
}
public void addItem(Item i) {
itemList[size] = i;
size = size +1;                      // Or size++
}
}
You might be interested in
Your company is experiencing an increase in malware incidents. Your manager is asking for advice on how best to verify that comp
zepelin [54]

Answer:

Option C.

Explanation:

The company is witnessing a spike in incidents involving malware. The boss is looking for advice on the best way to check that corporate-owned desktops are up-to-date regarding security updates, anti-malware standards and software or application updates. The boss is also worried that somehow the staff-owned gadgets that link to the corporate Local area network use the same level of protection as the devices in the corporation.

So, the user implements security and resources from endpoint management system appliance.

7 0
3 years ago
PLEASE HELP ME
alexira [117]

Answer:

it won't be able to run

Explanation:

because computer runs on physical memory

5 0
3 years ago
Write a program that takes as command-line arguments an integer N and a double value p (between 0 and 1), plots N equally spaced
OlgaM077 [116]

Answer:

Please see below

Explanation:

Suppose N = 10. And you have these dots equidistant from each other, and probability = 0.3. According to the data provided in the question statement, we will then have forty-five pairs of points. The task is to draw lines amongst these pairs, all 45 of them, with a 30% probability. Keep in mind that every one of the 45 lines are independent.

A few lines of simple code (just some for loops) needed to run this is attached in the image herewith, .

 

8 0
3 years ago
Most of the Desktop games contain a backdoor used to test and update the game.
sveta [45]

A backdoor is a typically covert method of bypassing normal authentication or encryption in a computer, product, embedded device (e.g. a home router), or its embodiment (e.g. part of a cryptosystem, algorithm, chipset, or even a "homunculus computer" —a tiny computer-within-a-computer such as that found in Intel's AMT technology).Backdoors are most often used for securing remote access to a computer, or obtaining access to plaintext in cryptographic systems. From there it may be used to gain access to privileged information like passwords, corrupt or delete data on hard drives, or transfer information within autoschediastic networks.

the answer is True

i hope it will help you

8 0
3 years ago
Write a program that prompts for a positive integer and prints the factors of all integers from 1 to that input integer. For exa
xeze [42]
74(Frequency) or 34(frequency)
7 0
3 years ago
Other questions:
  • What word does<br> this pattern spell?<br> d.
    7·1 answer
  • In Word, a red wavy underline indicates a/an
    15·1 answer
  • So lets see what you know...Write me a short code and include a detailed explanation of the language used and what the out come
    7·1 answer
  • True or False, A column is a horizontal arrangement for items of information.
    15·1 answer
  • Steps in the systems development life cycle​
    15·2 answers
  • Describe the application of computer system in our daily life​
    13·1 answer
  • an individual’s Body Mass Index (BMI) is a measure of a person’s weight in relation to their height. it is calculated as follows
    6·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
  • D&gt; Windows is the most popular for ​
    11·1 answer
  • Lookups comes before Tags in the search-time operation sequence. True or False: Lookups can reference Tags.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!