Object oriented programming, Programming Languages

Assignment Help:
I need help with this question. The problem i''m having is that what''s the syntax for using dynamic memory allocation of objects of one class in the constructor of some other class. in short, how can i use dynamic memory allocation of objects inside composition?


SEECS is organizing student fair where students will be setting up food and game stalls.
Everybody is invited faculty, students, staff and even the families. To make the customers buy
more food and try more games the student administration devised an interesting plan. They are
arranging lottery scheme at every stall. But as always happens there is a problem, the
management of such a big scheme. To handle this problem the student administration has
hired you to make an application to manage the records of the lottery.
Firstly, the plan of the student administration is that every stall has its own lottery.
Every time when a customer will buy any food item or try any game form any stall a new entry
in the lottery of respective stall will be automatically made by the application. The
administration has also decided to monitor the whole system by themselves, that’s why the
lottery system of stalls will be running from the same server. At the end a random function will
chose the winner and announce that.
Your application would be having a structure like this:
- A class fairwhich has capacity of up to 5 stalls (the main server).
- A class stallwhich has its own necessary specifications like name, type, Id,
owner etc. in addition to a single instance of lottery.
- A class lottery to hold up to 100 customers irrespective of the type i.e.
faculty, student, staff or family
- A classcustomer to hold the basic information like name, type, time_of_entry
etc. and lottery Id number of the customer.
The Application must be having at least the following functionalities:
- Providing an interface to enter the data of new customer every time he buys
any food item or plays a game.
- Assigning an Id to each customer by itself after the data has been entered.
- At the end choosing a winner form each stall by some random function.
Notes:
- Use composition.
- Make necessary functions, constructors and destructors.
- Use dynamic memory allocation where ever possible (Bonus points).
- You must apply all the necessary checks.
- Not just the correct, User friendly and easy to use interface will get maximum marks.
Hint:
- Think of the real world scenario and make the things accordingly.

Related Discussions:- Object oriented programming

Matlab, I need to write code to compute matrix multiplication without usin...

I need to write code to compute matrix multiplication without using built in function.

How to write a kernel module, Overview You will write a loadable kernel...

Overview You will write a loadable kernel module. If you have an idea which you can convince me is a good idea that can not be done as a module, but only via direct modificatio

Pseudo-code to illustrate the breakpoint in a program, The standard way for...

The standard way for debuggers to plant interactive breakpoints in a program in RAM (whatever the processor instruction set) is to save the break pointed instruction and replace it

Small perl program, 1. use a small perl program and matching config file to...

1. use a small perl program and matching config file to retrieve and reformat the system time for a number of remote machines via snmp.  Readings should have a local timestamp for

Define the if - else - if statement - computer programming, Define The if -...

Define The if - else - if Statement - Computer Programming? The universal form is                         if (expression 1)                         {

Understanding the html document object model, At the core of DHTML is the D...

At the core of DHTML is the Document Object Model, or DOM, which represents the HTML or XML of a Web page that is displayed in a browser. The Document Object Model that represents

Django template, i''ve a problem with rendering a page with django template...

i''ve a problem with rendering a page with django templates

Flowchart and Pseudocode using Control Breaks, Shemrock Inc. is a brake pad...

Shemrock Inc. is a brake pad manufacturing company. This company uses raw materials, such as carbon powder, iron, ash, and resin. It wants to develop an inventory management system

Design a address book, Consider the operation of a line of supermarket chec...

Consider the operation of a line of supermarket checkouts and the profiles of customers and their shopping baskets. Use a random number generator to create the data for these profi

C# not c++ programing help, Please write a program declaring a variable x a...

Please write a program declaring a variable x as the type int, and use the scanf function to input an integer to initialize the value of x. Then, your program will print the follow

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd