I'm not able to do the DELETE and the SEARCH options on my list ( HELP!! )

import java.io.*;
public class StudentContactManager
public static void main(String[] args) throws IOException
char userSelection;
final int maxStudents = 10;
String [] Lname = new String [maxStudents];//LName= Last Name
String [] FName= new String [maxStudents];//FName=First Name
String [] En= new String [maxStudents];//En = Enrolment Number
String [] PhoneNo= new String [maxStudents];
int activeEntries = 0;
boolean found = false;
//================================
System.out.println ( "1 - Initialise contact detail list" );
System.out.println ( "2 - Display contact details list" );
System.out.println ( "3 - Insert new entry into cotact detail list" );
System.out.println ( "4 - Delete entry from contact detail list" );
System.out.println ( "5 - Search cotact detail list" );
System.out.println ( "Q - Quit" );
System.out.print ( "Option : " );
userSelection = Text.readChar ( "Enter option" );
while ( userSelection != 'Q' & userSelection != 'q' )
switch ( userSelection )
case '1': activeEntries=0 ;
break;
case '2': if (activeEntries > 0)//IF contact detail list contains entries
System.out.println("\tEnrolment Number\tFirst Name\tSecond Name\tTelephone Number");
for (int i = 0; i<activeEntries; i ++)//FOR each stored contact
{//DO
System.out.println();
System.out.println("\t"+En[i]+"\t"+"\t"+FName[i]+ Lname[i]+"\t"+"\t"+PhoneNo);//Display one/current contact detail
}//END-FOR
else
{// ELSE
System.out.println("Contact detail list empty");//Display �Contact detail list empty� message
}//END-IF
break;
case '3': if(activeEntries<maxStudents)
En[activeEntries]= Text.readString("Enter enrolment number");
found = false;
int i = 0;
while ( !found && i < activeEntries)
if (En[i].equals(En[activeEntries]) )
found = true;
else
i++;
}//end-if
}//end-while
if (found == false)
FName[activeEntries]=Text.readString("Enter first name");
Lname[activeEntries]=Text.readString("Enter last name");
PhoneNo[activeEntries]=Text.readString("Enter telephone number");
// Insert new contact details into contact detail list
activeEntries++;
else
System.out.println("Enrolment number already exists");
else
System.out.println("Contact detail list full");
break;
case '4': Text.showMessage("Selected Option 4");
break;
case '5':Text.showMessage("Selected option 5");
default: Text.showMessage("invalid selection, Please input a valid option");
break;
}//switch
userSelection = Text.readChar ( "Enter option" );
}//while
System.exit(0);
}//main
}//StudentContactManager
//===============================================================================
I need help with case 4 and case 5...the search option should include while statement. and the 5th case is the delete option
Thanks guys =).

Please use the code tags when posting code (there is a button on the posting page for them). It would also help if you told us what you are trying to do, what error you are getting, and what you expect to get.
If you are just asking us to write the code for you, then you are in the wrong place.

Similar Messages

  • Not able to get the profile option value

    Hi,
    Not able to get the profile option value after i changed the new value in the application.
    I am using fnd_global.apps_initialize to initialize the apps from PLSQL code to get the updated profile option value. But fnd_profile.value is not getting fetched the updated value. Still it is fetching the old one. I mean it is stored in database cache. Please any one let me know how to get the new value every time after i changed the value.
    Thanks

    What is the application release?
    Is this a custom or seeded profile option?
    Can you confirm that the value got changed from the application (query the profile option and verify the value)?
    Can you reproduce the issue if you use an API to update this profile option as per (How to Change Profile Option Value Without Forms? [ID 943710.1])?
    Thanks,
    Hussein

  • Not able to edit the value options in LKM

    Hi
    I have recently upgraded to ODI 11g .
    In that we are not able to edit the value options in LKM.
    (i.e.. editor window is not appearing, not able to edit the text.
    Please let me know the solution .
    Thanks

    We were using JDK1.6.0_29 and it was not supporting ODI 11.1.1.5, so we have uninstalled the JDK1.6.0_29 and reinstall the JDK1.6.0_11.This solves our issue.
    Thanks a lot!!

  • I have inadvertently infringe copyright on facebook and they have subsequently barred me from uploading any more videos. The question I need answered is ( and not able to find the answer on any of you help pages).....  Do the following have free copyright

    I have inadvertently infringe copyright on facebook and they have subsequently barred me from uploading any more videos.
    The question I need answered is ( and not able to find the answer on any of you help pages).....
    Do the following have free copyright to publish on facebook and U Tube?
    1.Garage band sounds?
    2.Slide show...Sample music and Theme music?
    3.iMovie...iMovie sounds and iLife sounds ie.Medal Ceremony and Memorial etc?
    I note one can publish to shared net places directly from iMovie so one assumes these are copyright free for non-profit making and non-comercial use.
    It is impossible to contact apple direct.No email address.We put our selves at risk without this knowledge and like applemac, facebook will not communicate direct.Will applemac please take responsibility for copyright/the above that they are all too willing to sell to us but not support us with that knowledge.
    I have Mac OS X Snow Leopard version 10.6.2 (2009 bought in 2010)

    Thank you Klaus1.The large font, I copied and pasted from my mail box.I'm visually impaired...not to a huge degree but it helps to use the large font.I believe you are right about the copyright on the imac stuff but if facebook decide otherwise, you have to reply electronically to their challenge.If you can't provide a reference directly from the copyright owner then they remove the video.I believe this is a programmed response and no human is involved which now makes it impossible for me to get my video uploading restored.They detect added soundtrack automatically and then challenge.There are many others in the same boat and facebook will not communicate.They have various discussion sites on which I have left messages including Mark Zuckerbergs own facebook but I don't think anyone from facebook ever reads them.I intend to start a second facebook which I can use purely to get my videos uploaded as a lot of my friends enjoy them BUT don't want fall foul of their programming again.If only iMac would put something on the net to this effect.I think it is so unfair that with modern technology it is impossible to contact these large conglomerates personally and receive an email response.I tried emailing [email protected] but I got a failure notice.If you have any ideas on how to get verification from apple direct, I would be very grateful.Thank You.

  • HT1918 why i am not able to see the none option in the payment link?

    why i am not able to see the none option in the payment link?

    Did you create a new account using an email address not used with Apple before?
    Maybe your county does not allow a None.
    I am in the US and created a None account using those instructions.

  • Hi, i hav an Iphone 4S (ios 7.1) with me.. it is abnormally increasing its temperature due to no reason and i am really worried about that. The fully charged phone is getting empty within minutes. Not able to attend the calls due to its overheating. help

    Hi, i hav an Iphone 4S (ios 7.1) with me.. it is abnormally increasing its temperature due to no reason and i am really worried about that. The fully charged phone is getting empty within minutes. Not able to attend the calls due to its overheating. help me please..
    It shows a 'temperature rise, need to cool down your phone' message regularly.. It happens when i when i try to connect my fone to the internet using cellular data, and it happens more suddenly when my 3g is on.. help me to sort out this, please

    Make an appointment with the Apple genius bar for an evaluation.

  • Not able to view the journal options in HFM

    Hi Experts
    1. Journal posted but am not able to view the journal option in the left handside. What would be the reason?
    regards
    Smilee

    Hi,
    Can you check once access rights of your login credentials.
    Regards,
    Sasi

  • HT2534 i am not able to see the payment option none

    i am not able to see the payment option none while using my apple id for the 1st time in itunes store

    Did you create a new account using an email address not used with Apple before?
    Maybe your county does not allow a None.
    I am in the US and created a None account using those instructions.

  • Not able to generate the spool from transaction cv02n .Kindly help,urgent..

    Hi ALL,
            I have a problem in transaction CV02N. Actually i am an ABAPER, but i need some help of PP Guys.
    The requirement is as follows:-
       The client says that they have uploaded a  '.PS'  file into the transaction cv02n.Here in the first screen they give doc, doc type,doc part, doc version. when clicked on enter it take us to second screen , where they enter the '.PS' file path under 'originals' , in the tab 'document data'.   Later they goto transaction CO01 and release an order at the operation level and save it.
    Then it generates a spool. Now if we goto SP01 and check the spool with the number generated during saving CO01. We will be getting the scripts and the '.PS' file separately in a different spool in the production system in 4.6. But in my new upgraded system(6.0), i am not able to view the '.PS' file in the output spool.It seems to me that, it is not getting generated. Pls suggest me, as it is a very urgent issue. Need to close it by today at 1.00pm.
    Regards,
    Manasa.S

    dear friend,
    there would be several reasons for that.
    first, check out your Output Device (your user in SU01) - goto to tab Defaults and look at Spool Control.
    did you tick the 'output immediately' checkbox?
    Fix it if nessesary. Just in case run SPAD to check out your device.
    second, check out the 'output' config for Document Management (because you use t-code CV02N).
    also make sure that relevant output condition exists.
    third, ask someone to do the same - another user with another output device. does he/she have the same problem?
    and the last, try to find out the functional guy or documentation.
    also ask your basis guy regarding the lost transports or any other issues...
    do not worry, life is good.
    good luck!

  • Unable to sync new iPhone 4s. I have iTunes version 10.6.1. Using Windows 7. My device appears on iTunes but I am not able to select the sync option and it does not automatically start the sync option when plugged in. Ive tried reseting the device.

    I am unable to sync my new iPhone 4s OR my iPod Touch 4 to iTunes.(this is the first time I am plugging them into iTunes) I have version 10.6.1. Both devices are up to date with the latest software version. Once I plug the device in, it is recognized on iTunes.The synce process does not start automatically. I am unable to select the sync option. I've tried reseting the device and restarting iTunes and the same problem happens. I have plugged in my husbands iPhone 3gs and the sync process starts automatically. I have also added my computer as an authorized computer for the new devices. What now?

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • HT2534 I am using iPod Touch (4th Generation). I tried the above mentioned step 5-7 times, but I am not able to see the "none" option. Please help me out.

    Hi,
    I did all the steps, that were mentioned above, but still I am not getting free option.
    Please help me out.
    Thanks

    Did you create a new account using an email address not used with Apple before?
    Maybe your county does not allow a None.
    I am in the US and created a None account using those instructions.

  • This new version 10.6 is giving me a lot of problem.  After downloading the latest i tune version for windows 7 64 bit, i am still not able to open the i tunes.  can anyone help, please?

    anyone know how to solve this problem, after downlaod, cannot open i tunes at all. 
    i have downlaod 5 times, still cant. Can the i phone service centre help with this?
    Am from Singapore.

    Restart Computer.
    Refer steps here to delete SC file(s):
    Win7/Vista http://support.apple.com/kb/TS2363
    WinXP http://support.apple.com/kb/TS1776
    Then proceed to repair your QuickTime. START > CONTROL PANEL
    WinXP - Add n Remove Programs
    Win7/Vista - Programs n Features
    highlight QUICKTIME and click CHANGE then REPAIR

  • I am not able to execute the following code....Help me ...I am a beginner

    REPORT  YCL_TEST1                               .
    tables : pernr.
    data : pn_begda type p0001-begda,
           pn_endda type p0001-endda.
    infotypes : 0001, 0002, 0006.
    get pernr.
    provide * from p0001
    from p0002 between pn_begda and pn_endda.
    write : p0001-sprps, p0006-locat.
    endprovide.

    Hi
    When you use the Statement <b>get PERNR</b>. This referst to the Logical Database.
    Define the Logical Database in the attributes of your program and you should not face this error.
    Hope this helps and welcome to SDN

  • Not able to fetch the correct line in interactive list

    Dear All,
    I am making an interactive report wherein I want to fetch the data as per the line clicked by the user.
    e.g.
    Particulars        value
    ABC                  12
    PQR                  14
    XYZ                    20
    Whenever I am clicking the list on ABC, the system is fetching the last value in the internal table.
    Can anyone please guide me on this?

    Hi Aasim,
    Please look into the below code. for simple interactive report
    DATA : BEGIN OF itab OCCURS 0,
             name(10),
             num TYPE i,
           END OF itab.
    itab-name = 'ABC'.
    itab-num = 123.
    APPEND itab.
    itab-name = 'BDC'.
    itab-num = 125.
    APPEND itab.
    itab-name = 'xyz'.
    itab-num = 345.
    APPEND itab.
    LOOP AT itab.
      WRITE : / itab-name,
                itab-num.
      HIDE itab-name.
    ENDLOOP.
    AT LINE-SELECTION.
      WRITE : itab-name.
    Regards
    Kumar M.
    Edited by: mukesh kumar on Oct 29, 2008 6:54 AM
    Edited by: mukesh kumar on Oct 29, 2008 6:55 AM

  • Not able to change the price of PO

    Hi All,
    I am not able to edit the price on PO.
    Materail is free text catalog orders from SRM, I am not able to change the price.
    Could you please help me in changing the price.
    Is there any other steps i need to do to change the price.
    Thanks

    Hi there,
    Is it greyed out or do you get an error?
    Are there any follow-on documents?
    Regards,
    Matthew

Maybe you are looking for

  • I have a project that won't let me see my photos

    If any one can help me, I have a project in aperture, that says that I have 638 photos in it, but i don't see any of them displayed. If I use the filter and ask to see ALL my photos, I can see most of them, but not if i select the project. Any one kn

  • Encoding .MOV audio/video skew problem

    Just started using PRE 8.0 and am running into problem encoding into QuickTime format only.  The QT encoder fails to synchronize the audio and video tracks.  Encoding an hour long single source video (MPEG SVCD format), the 2 tracks become offset by

  • Possible to set Dynamic Config from ABAP Proxy

    Hi, I know how to get and set Dynamic Config from Java/XSLT mappings and adapter modules. But I want to do this from an outbound ABAP Proxy Call (in the same way I can set the serialization context for EOIO), is that possible? The scenario is: I have

  • About BAPI_REQUISITION_CREATE

    Hi experts:    I use the bapi "BAPI_REQUISITION_CREATE" to create PR,i use the follow code evaluate material number and mpn number. aa_out-material = wa_out2-matnr."material number aa_out-pur_mat = wa_out2-ematn."MPN material number but when the pr c

  • Oracle IAMS and UCS (Communications Suite) interoperability - is there any?

    I am relatively new to Oracle IAMS, but had some experients with Sun IDM. It seems the two projects are quite different, with IDM being essentially a replicator of entered (or sucked-in) user metadata into slave repositories such as LDAP servers, dat