Page 283 - C++
P. 283
I1=INVENTORY()
I2=INVENTORY(105,"Thumb Pin",50)
I3=INVENTORY(102,"U Clip")
I1.Procure(25)
I2.Issue(15)
I3.Procure(50)
I1.Status()
I3.Status()
I2.Status()
(f) What are the possible outcome(s) executed from the following code ?
Also specify the maximum and minimum values that can be
assigned to the variable N. 2
import random
NAV = ["LEFT","FRONT","RIGHT","BACK"];
NUM = random.randint(1,3)
NAVG = ""
for C in range (NUM,1,-1):
NAVG = NAVG+NAV[I]
print NAVG
(i) BACKRIGHT (ii) BACKRIGHTFRONT
(iii) BACK (iv) LEFTFRONTRIGHT
2. (a) List four characteristics of Object Oriented Programming. 2
(b) class Exam: 2
Regno=1
Marks=75
def __init__(self,r,m): #function 1
self.Regno=r
self.Marks=m
91 13 P.T.O.