B false data does not only have to be facts
Answer:
Check the explanation
Explanation:
bool oneSale(string item){
for(int i=0;i<capacity;i++){ // iterate till the capcity of array
if(item==grocerryList[i].name()){ // if name matches
if(grocerryList[i].getStock()>0){ // and stock is greater than 0
grocerryList[i].setStock(grocerryList[i].getStock()-1); // subtract 1 from the stock
// or alternate is grocerryList[i].stock= grocerryList[i].stock-1;
return true; // return true
}
}
else if(item==grocerryList[i].name()){ // if name matches
if(grocerryList.getStock()==0){ // but stock is empty
return false; // return falsse
}
}
else{ // means item is not available so there is no need to check stock
return false; // return false
}
}
}
Answer:
D. It allows programmers to write abbreviations instead of repeating calculations
Answer: Some insights big data can provide about my hobby, gaming, is what year a certain game was created or the number of purchases made in a year. These insights can make things better for me by knowing what versions to receive first and what's the best game to get. Although, some ways big data can make it worse is by not understanding what the information is saying due to a lack of data or context. They can also make it worse by data and system errors, causing problems for me due to the decisions I make off of it.
I hope this helped!
Good luck <3
Answer:
The following Window class are given below:
class Window // define a class Window
{
private: //access modifier
int width, height; // integer type variable which is width and height
public: //access modifier
Window(int w,int h) //constructor that accepts two integer parameters
{
width = w;
height = h;
}
friend bool areSameSize(Window a, Window b)
{
if ((a.height == b.height) && (a.width == b.width))
return true;
else return false;
}
};
Explanation:
According to the question: Firstly we have define a class which name is 'Window' and then we take two integer type data member and after that we have constructor that takes two integer type parameters and after all we have a areSameSize, friend function, which can take two objects and then it give output in the form of true or false, if they are the equal size and finally we check that if the width and the height match then it returns the true and else it returns the false