Answer:
Binary sort
Explanation:
Binary sort is one of the fastest search techniques used on arrays and other iterable data types. It algorithm sorts the array in ascending order then gets the item in the middle from which it divides the array to be searched in two parts. If the searched term is less than the mid item, then it is searched for in the first part, else it would be in the second.
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++
}
}
Answer:
do you still need the answer? or am i to lateeee
Explanation:
Answer:
Explained
Explanation:
The three characteristics of an object
Encapsulation: It is the process of capturing data and securing it for safety from the outside interfaces. Binding data and operations of data into a single unit.
Inheritance: This is the process by which a class can be derived from the base class, with all features of base class and some of its own. This increases data reusability.
Abstraction: The ability to represent data at very basic level without showing the details of it is called abstraction.