2. Following question 1, develop a main( ) function: (note: use the function whenever you can - this shows your ability
Posted: Sun May 15, 2022 8:06 am
2. Following question 1, develop a main( ) function: (note: use
the function whenever you can - this shows your ability to take
advantage of object-oriented programming) a. Declare part nut, part
number is 100, inventory is 1000, unitprice 0.15. b. Declare part
bolt, part number is 200, inventory is 300, unitprice 0.25. c.
Display the inventory of bolt: "Bolt: yyy. ." (yyy is the value) d.
Display the inventory of nut: "Nut: yyy." e. Check the inventory of
both. If anyone is low, buy 800 units. f. At the end, check whether
the inventory of the two parts are the same. Display the result
("Same" or "Not the same").
the function whenever you can - this shows your ability to take
advantage of object-oriented programming) a. Declare part nut, part
number is 100, inventory is 1000, unitprice 0.15. b. Declare part
bolt, part number is 200, inventory is 300, unitprice 0.25. c.
Display the inventory of bolt: "Bolt: yyy. ." (yyy is the value) d.
Display the inventory of nut: "Nut: yyy." e. Check the inventory of
both. If anyone is low, buy 800 units. f. At the end, check whether
the inventory of the two parts are the same. Display the result
("Same" or "Not the same").