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
What can the tab key do
bulgar [2K]
Answer: it indents

Explanation:
8 0
3 years ago
You are creating a story map about Mexico. After configuring the web app template, you launch the app to test it. When the app o
navik [9.2K]
Nbdjsksjsidjdjwkwejd
3 0
3 years ago
Which of the following statements applies to the Apple Macintosh computer
deff fn [24]
B






_______________________________________________________
3 0
3 years ago
Read 2 more answers
How do you change the top and bottom margins of an entire document
Elodia [21]
Deep depending on the document editor, you should be able to just click either the top or bottom margin to edit!
6 0
3 years ago
Drag the tiles to the correct boxes to complete the pairs.
LiRa [457]

The matchup are:

  • information support and services - providing technical assistance to users
  • network systems - creating interactive materials
  • programming and software development - designing and developing applications for an organization's use
  • web and digital communications -developing and implementing an
  • organization's technology infrastructure

<h3>What is network system?</h3>

A network is known to be made up of a set of computers, servers, network devices, and other devices that are linked so that it can allow data sharing.

Therefore, The matchup are:

  • information support and services - providing technical assistance to users
  • network systems - creating interactive materials
  • programming and software development - designing and developing applications for an organization's use
  • web and digital communications -developing and implementing an
  • organization's technology infrastructure

Learn more about network systems from

brainly.com/question/1326000

#SPJ1

6 0
2 years ago
Other questions:
  • When using bits to represent fractions of a number, can you create all possible fractions? Why or why not?
    6·1 answer
  • In which of the following situations will a macro make your work more efficient?
    7·1 answer
  • Create two Lists, one is ArrayList and the other one is LinkedList and fill it using 10 state names (e.g., Texas). Sort the list
    6·1 answer
  • Impact of computer in society, using relevant examples​
    13·1 answer
  • Write a function that takes a list and returns its first element​
    15·1 answer
  • Question 1 Which portion of the PuTTY package allows you to perform file transfers using the SCP (Secure Copy) protocol?
    12·1 answer
  • A(n) _____ is a computerized system by which subscribers are able to communicate to all other subscribers by sending a transmiss
    5·1 answer
  • Artificial intelligence (ai) in perspective is a complex and interdisciplinary field that involves several specialties, includin
    9·1 answer
  • Name a wireless technology tat may work with one device and not another?
    5·1 answer
  • Which technologies are currently used in health ​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!