create a c++ file with class named bluebox should have member functions admin- a
ID: 3547827 • Letter: C
Question
create a c++ file with class named bluebox
should have member functions
admin- allows the owner of the machine to sign in using code 99. the member function screen should the owner any dvds currently in stock or not renter and those that have been returned. how much money made on sales. assume all revenues as profit.
inventory- track dvd invrntory. 2 copies of 3 different dvds available only. if they request a tile out of inventory must tell em.
screen- should control all output to the screen. including user interface.
customers-should tell which customer is renting. give each customer a name and greet them each time they sign in. there are three customers which gain access using code 00 01 12
returned- control the returned dvds by a customer. these are not restocked.
the whole program should keep running once the code has been entered customers can rent anf return without reentering the code
when there is no dvds in the box program should close down and cout a message out of order
Explanation / Answer
// It's a good idea to have a utility class to wire up inheritance.
function inherit(cls, superCls) {
// We use an intermediary empty constructor to create an
// inheritance chain, because using the super class' constructor
// might have side effects.
var construct = function () {};
construct.prototype = superCls.prototype;
cls.prototype = new construct;
cls.prototype.constructor = cls;
cls.super = superCls;
}
var MyChildClass = (function () {
// constructor
var cls = function (surName) {
// Call super constructor on this instance (any arguments
// to the constructor would go after "this" in call(
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.