Object oriented programming, Programming Languages

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.
- 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.
- Think of the real world scenario and make the things accordingly.
Posted Date: 4/8/2012 10:49:34 AM | Location : United States

Related Discussions:- Object oriented programming, Assignment Help, Ask Question on Object oriented programming, Get Answer, Expert's Help, Object oriented programming Discussions

Write discussion on Object oriented programming
Your posts are moderated
Related Questions
Develop a Windows Forms Application by creating a new project named "xxxxxxxx" in a new folder named "xxxxxxxxas3" where xxxxxxxx is your student id. You should delete file(s) with

specify the function of the instruction and also specify whether its right or wrong-: (5) 1) MOV [BX],AX? Register Indirect addressing 2) MOV CX,[BX+DI]?Base plus index add

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

How does a program provide "input" to one of its functions?

A number of simple student records are written to a text file. The format of some typical linesshould be - Task (1): Using a text editor, create a file with 10 such reco

MVC Framework The ASP.NET MVC Structure is a web program framework that tools the model-view-controller (MVC) design. According to ASP.NET, it allows application designers to devel

Example problem Imagine that  you  require  to create  a robot  that  will  roll up  close to a light  lamp  and  stop  a fixed distance from it.  The first question is, how w

Explain the While Statement - Computer Programming? A 'while statement' is an entry controlled loop statement. When the expression is calculated and the condition is not satisf

i want to record in database but how to delete only duplicate field not row in vb 6.0 or ms-access

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4