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
Lenny copied and pasted content from a commercial website into his research paper without citing his source, passing the work of
Sedbober [7]
Lenny might be either suspended
Or might be failed in that particular course
6 0
9 months ago
Patient letters created from __________ use structured data and do not require a large amount of typing from the medical assista
umka2103 [35]
Templates I think. not sure
3 0
3 years ago
Four actions that can be implemented on a database to autocorrect violations of referential integrity, and the outcomes of the a
Paraphin [41]

Answer:

Follows are the matching to this question:

Option \ a \to \ Option \ 3\\\\Option \ b \to \ Option \ 4\\\\Option \ c \to \ Option \ 1\\\\Option \ d \to \ Option \ 2\\

Explanation:

While time-consuming or prone to errors mechanical adjustments to both the referential, databases could be configured with four measures to engine violations. The restricted action causes the insert, update, and removes to only be denied. Set Null to NULL sets the invalid external key, whereas Set Default to a specific core consideration specified in SQL sets a default foreign key. Its Cascade operation spreads the main changes in external keys.

6 0
3 years ago
When defining a system
Sveta_85 [38]

All of the given answer options are necessary to operate the enterprise resource planning (ERP) system when defining a system  landscape.

Enterprise resource planning (ERP) can be defined as a business strategy process through which business firms manage and integrate the main parts of their day-to-day business activities by using software applications.

The main objective and purpose of an enterprise resource planning (ERP) system is to significantly reduce costs by integrating all the operations of a business firm.

In Computer science, when defining a system  landscape, all of the following are necessary to operate the enterprise resource planning (ERP) system:

  • Technical expertise
  • Computer hardware
  • Networking hardware

Read more on ERP system here: brainly.com/question/25752641

7 0
2 years ago
_____ is a predefined format used for text the can include multiple font formatting features
seraphim [82]
The correct answer is



style
8 0
3 years ago
Other questions:
  • Write a program that takes as input an arithmetic expression followed by a semicolon ";". The program outputs whether the expres
    11·1 answer
  • Write a method reverse( ) for OurLinkedList class. The method should return a new OurLinkedList object that is the reverse of th
    8·1 answer
  • What are three responsibilities of an operating system? please answer quick!!!
    9·1 answer
  • What organization is responsible for the registration of Internet domain names?
    14·1 answer
  • List 3 items that were on kens resume that should have been excluded
    13·2 answers
  • I wanna start answering questions for people, but I don't quite know how. Can you help me?​
    13·1 answer
  • The __________ assumption necessary for a linear programming model to be appropriate means that the contribution to the objectiv
    6·1 answer
  • PLEASE HELP ASAP!!! 99 POINTS FOR 3 MULTIPLE CHOICE QUESTIONS!!! PLEASE ANSWER ALL!!!
    8·1 answer
  • Please Answer ASAP!!
    15·1 answer
  • Write a function called printRange() that accepts two integers as arguments and prints the sequence of numbers between the two a
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!