-
Help needed with an assignment thank you
I have been thinking for a few days up to now and i still have no idea how to do it. help me!!!
"The travel agency has 6 representatives. Each of them has an ID number.
Consider how best to store these ID numbers not using six fields variables nor ArrayList. The IDs should be initialised in constructor of class Termunal.
There is another class called Representatives where reps logging in. So when one of the reps logs in, it should check that the ID used to log in is valid."
All help is really appreciated!!
-
A two dimensional array sounds like a choice, to me - using strings(?)
Or parallel arrays - if you want to store int IDs in one and string name or other identifier in the other ...
-
 Originally Posted by nspils
A two dimensional array sounds like a choice, to me - using strings(?)
Or parallel arrays - if you want to store int IDs in one and string name or other identifier in the other ...
Why not make a class Representative and just make an array of that? That seems much cleaner to me.
-
From the information given, this is supposed to be a structure of the Terminal class which has persistence. This requirement sounds like a lookup table to me. When a Representative attempts to log in, an instance of Representative is created, including the id number which the person logging in supplies. The instance is then passed to the Terminal class which checks whether or not the id number supplied in the instance matches its record of what that id number is supposed to be. If there is a match, then the Representative is allowed in ....
-
 Originally Posted by nspils
From the information given, this is supposed to be a structure of the Terminal class which has persistence. This requirement sounds like a lookup table to me. When a Representative attempts to log in, an instance of Representative is created, including the id number which the person logging in supplies. The instance is then passed to the Terminal class which checks whether or not the id number supplied in the instance matches its record of what that id number is supposed to be. If there is a match, then the Representative is allowed in ....
yes you are right. Any ideas how to do it please? Thank you
-
 Originally Posted by destin
Why not make a class Representative and just make an array of that? That seems much cleaner to me.
could u help me to write a code?Thanks
Similar Threads
-
Replies: 5
Last Post: 12-19-2005, 06:10 AM
-
By premartha in forum C++
Replies: 3
Last Post: 10-21-2005, 10:06 AM
-
By sparkette in forum Java
Replies: 2
Last Post: 07-02-2005, 12:35 PM
-
By librypat in forum Java
Replies: 1
Last Post: 07-16-2002, 11:03 AM
-
Replies: 0
Last Post: 12-12-2001, 10:03 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|