Answer:
The output of the code is "2 10/16 inches".
Explanation:
It first declares size1 as that of an InchSize object to 1 and 16 cm as 12. InchSize object size2 to four and sixteenth inches as 11 inches
Whenever users add size1 and size2 in sumSize, it will become 5 inches as well as 23 and 16ths, however, the size will be reduced as well as the sixteenths larger than 16 will be converted to 1 inch. So 6 inches, 7 sixteenths, will become it. Then you're trying to subtract the amount of room left (which is 9 inches and 1 sixteenths)
It would first be 3-6 inches -6 16th, but the shape is reduced although it will take 2 inches - 10 sixteenths. It's the response.
Answer:
Explanation:
The ith column of an identity matrix is the unit vector ei (the vector whose ith entry is 1 and 0 elsewhere) It follows that the determinant of the identity matrix is 1, and the trace is n. When the identity matrix is the product of two square matrices, the two matrices are said to be the inverse of each other.
Answer:
"is-a" relationship is used to indicate that a derived class belongs to the family of base class.
Explanation:
IS-A relationship based on Inheritance, which can be of two types Class Inheritance or Interface Inheritance.
"is-a" relationship is used to indicate that a derived class belongs to the family of base class. For example vehicle is a class which belongs to car base class.
Any derived class that extends base class have " is-a " relation ship with base class
Any class that implement an interface also has " is-a " relation ship" with the interface
Answer:
The answer to this question can be given as:
Program:
#define class.
class PersonInfo:
def __init__(self): #constructor
self.num_kids = 0
def inc_num_kids(self): #define function inc_num_kids()
self.num_kids = self.num_kids + 1
return self.num_kids #return value.
p= PersonInfo() # creating object
print('Kids:', p.num_kids) #print value
p.inc_num_kids() #call function
print('New baby, kids now:', p.num_kids) #print value
Output:
Kids: 0
New baby, kids now: 1
Explanation:
The description of the above python program as follows:
- In this program firstly we define the class that is PersonInfo. In this class we define the constructor that is def __init__() and one function that is def inc_num_kids().
- The constructor is called automatically when the class object is created. In this constructor, we use the self as a parameter that is used to access variables that belong to class.
- In the constructor, we define the variable that is "num_kids". We assign value to a variable that is "0" and use the self for holding reference to the variable.
- Then we define the function. In this function, we increment the value of the variable by 1 and return its value.
- Then we create a class object that is p and call the function and print its value.
Answer:
Domain Networking.
Explanation:
A domain in networking refers to any group of workstation,users,printers devices ,database servers and computers which share different type of data via resources of network.
Hence domain networking will be the best option for the company having 40 workstation in a single building sharing a single network.