Answer:
Following are the code to the given question:
#include <iostream>//header file
using namespace std;
class Window //defining a class Window
{
private:
int width, height;//defining integer variable
public:
friend ostream& operator << (ostream& stm, Window& width)//defining a friend function that takes two parameters
{
return stm<<"a ("<<width.width<<" x "<<width.height<<") window"; //use return keyword that return its values
}
Window(int width, int height): width(width), height(height)//defining parameterized constructor that inherit width and height in its parameters
{}
};
int main() //Main method
{
Window w(80,90);//calling class constructor
cout<<w;//print object value
return 0;
}
Output:
a (80 x 90) window
Explanation:
In the above code, a class "Window" is defined that uses a friend function "ostream& operator" is declared that uses the "ostrea&" as a data type to hold two-variable "stm and w" in its parameter, and declared the parameterized constructor to hold value by inheriting width and height in its parameters.
Inside the main method, a class object is created that calls the constructor and uses the print method to print object value.
What does input allow a computer to do
Explain what Fahd did wrong in the scenario below. Fahd is running ten programs at once on his laptop when it suddenly freezes up. To fix this problem, Fahd buys a new battery for his laptop.
Answer:
Well first off. if the laptop froze that doesn't mean the battery is dead to the point where a simple rest of the laptop wouldn't work out.
What is an example of a composite key in a database table?
InvoiceID
CustomerID
ProductID
OrderID + ProductID
Answer:
b
Explanation:
OrderID + ProductID is an example of a composite key in a database table. The correct option is 4.
What is composite key?A composite key is a key in a database table that consists of two or more columns that uniquely identify each row.
In a database table, a composite key is the combination of OrderID and ProductID in a table that tracks sales transactions.
Because a single order can contain multiple products and multiple orders can contain the same product, neither column can uniquely identify a row by itself.
However, by combining the two columns, each row can be uniquely identified, ensuring that the data is accurate and complete.
Similarly, a combination of CustomerID and ProductID might be used in a sales system to track the products purchased by each customer.
Thus, the correct option is 4.
For more details regarding composite key, visit:
https://brainly.com/question/10167757
#SPJ3