URGENT: Simulation of computer network using Container classes

I am just starting to learn some C++ programming and would really appreciate some help from you experts *****

The program I am trying to work with will need to perform a simulation of a computer network. The network is represented as a class called comp_network. I am planning to declare this as a container class. This network supports an unlimited number of users and provides password security. It also contains functions to allow you to log-on and log-off of the system, and a way of shutting the network down.

Although this class is simulating a network with this program, there is no reason this class couldn't serve as a front end to a real network. In this capacity, the class could serve as an interface to the network for other computers on the local network. We could then write functions such as check_passwd() and logon() to provide hooks into the real network. Security issues aside, my goal is to make such information private so that the interface to the network doesn't have to change if the implementation details change.

Some things I want this code to do is -->

1. at object creation only 1 user is known, in UNIX this is the superuser called root.

2. this user can add new users, delete users, and print lists of users.

3. I also would like to add new users to the system, with both names and passwords

4. I would like to  supply a dummy command interface routine that just accepts commands, but doesn't do anything but print a "Finished with <command>" message. This must understand "logoff"

5. need to store a list that is dynamic, it grows with new users and shrinks when they are deleted. Don't need to store this list from program invocation to invocation. Everytime the program is restarted it will only have the original users.

6. logoff will be the command to exit from the simulated dummy command interface session. This brings you back to the user name prompt.

7. a username of done will terminate the program.

I was wondering if the code could utilize the main program given below. My idea was to declare a CONTAINER CLASS called "comp_network" and another class called "user".

main() {

comp_network cplusplus;

cplusplus.install(); // installs known users/passwords

cplusplus.operate_net(); //prints opening message

//and prompts for user and

//password, then goes into

//the command loop

// a username of "done" will

// finish the program


**** I would really appreciate it if some one could help me with some coding for this..as I am just getting the feel of C++ now..thanks a lot

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

well, homework, you should start with more simple homework. and when that homework becomes easy, just build up and build up until you really do don't need to ask people to do your homework for you.
URGENT? I hope not.

monkesdb's advice is good: start with something simpler. It doesn't sound like a homework assignment to me, because I can't imagine a professor setting a task like this. If this was assigned by a professor, it is time to change your course. You want to be able to count your successes in smaller steps.

However, if you like the context, and want to use it to teach yourself C++, and this isn't really URGENT, there's nothing wrong with what you have in main(), but you've got a long way to go before you'll get to flesh out that skeleton.

(1) Try defining a class for a user and see if you can put hard-coded data into it in a stand alone test program and then display it. Then pat yourself on the back.

(2) See if you can enter data into the class interactively. Success? Another pat on the back.

(3) If you are not familiar with the standard library containers (otherwise known as STL), set yourself some assignments to try putting simple data into containers and extracting them, before attempting to put an instance of your user class into the container.

(4) ....

If and when you get snagged on these more managable mini-assignments, EE is an excellent resource; but do make each problem a separate question, and please try to make the subject line relevant to the assignment. You are not going to get much sympathy from experts if you post a question: "URGENT: Need to write my own operating system", but you will get good responses even with modest points (we were all penniless students once), if you post focused queries.

Best of luck.
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ - no points refunded

Please leave any comments here within the next seven days.

EE Cleanup Volunteer
PAQed - no points refunded (of 300)

EE Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.