View Single Post
  #1 (permalink)  
Old 01-02-2008, 07:21 PM
pringle pringle is offline
Member
 
Join Date: Jan 2008
Posts: 12
pringle is on a distinguished road
Just a Few Questions
I'd just like to find out the answers to my questions that so far I haven't been able to find.
For example:

1)I'm creating a menu based program. The users need to press '1' to initialise the 'contact detail list' i'm creating. As the program is made up of four separate arrays, would that mean setting the active entry counter to zero separately for all the arrays? E.g.

String [] Peter = new String [firstName];
int active entries = 0;

2)Also, I have code that goes as follows:

if (contact detail list contains entries)
THEN
Display 'Contact detail list heading'
FOR each stored contact
DO
Display one/current contact detail
END-FOR
ELSE
Display ("Another message");

What I don't understand about this is that my program is called 'StudentContactManager' (which is what I was told to call it). Also, due to the fact that the program is made up of four arrays each with different names, how does the above code work i.e. if contact detail list contains entries.

3) Due to the fact that i'm using arrays with a fixed size, is it possible to 'insert new contact details into contact detail list' as i'm told to do?

4)The biggest problem i've had is to do with insertion points. I assume that where it says 'set insertion point of new entry to first entry' it means i = 0;. But i'm totally lost when it comes to the stage where it says:

IF Enrolment number is greater than enrolment number in last entry THEN
Set insertion point of new entry to entry after current last entry
ELSE
Locate insertion point of new contact detail
Move subsequent existing contact detail entries one position
END-IF
END-IF
Insert new contact detail at insertion point over-writing any previous contact
detail entry
END

Locate insertion point of new contact detail

BEGIN
Set insertion point identifier to first position
WHILE enrolment number to insert is greater than enrolment number stored at position identified by insertion point identifier
DO
Increment insertion point identifier
END-WHILE
END

I know it probably looks like I want someone else to do my work for me, but i've been on numerous forums asking for explanations, i've got books that don't cover what I need, i've asked friends who are like me and don't have a clue and so this is my last chance for some pointers - either that or a fail!!
Reply With Quote
Sponsored Links