Problem with users in Linux

Hi. I have a problem with my homework. I have to do a Script that will tell me the number of users that are logged in on my system through a network and find out their IP's.
Can you give me an idea?
Thanks

Yes. Don't post the same question again thinking we won't notice.

Double homework post, thread closed.

Note that to post here you must follow the special rules and guidelines for posting homework: