Help need to learn how to do this?

1. Name, which has fields:
    - String lastname
    - String firstname
2. Address, which has fields:
    - int stnum
    - String street
    - String city
    - String postalCode
3. PassengerRecord, which has fields:
    - int passengerID
    - Name passengerName
    - Address passengerAddr
4. Passengers, which has fields:
    - int numpassengers
    - PassengerRecord[] passRecords
5. TrainStation, which has fields:
    - String  trainStationName
    - Address trainStationAddr
    - Passengers passengerRecs
The main routine, in class MainClass, MUST look like this:
public static void main(String[] args){
  TrainStation station = new TrainStation();
  station.readIn();
  System.out.printf("station=%s",station.toString());
}//main
which creates an instance of class TrainStation,
then calls the readIn() function of that TrainStation object which will:
1.  read in the  trainStationName, which is a String
2.  read in the trainStationAddr, by calling trainStationAddr.readIn()
3.  read in passengerRecs, by calling passengerRecs.readIn() which
    reads in the number of PassengerRecord objects and
    creates the array passRecords.
    Then, passengerRecs.readIn() calls readIn() on each
    passenger record in array passRecords, which will
    in turn read in the passengerID,
    and call passengerName.readIn(), and passengerAddr.readIn()
After calling station.readIn(), main will print out all of
the contents of the TrainStation object pointed to by printing
station.toString().can someone help me learn this fast like any places where i can read and learn how to do this?

javakingloww wrote:
can someone help me learn this fast like any places where i can read and learn how to do this?Assuming you went to class and payed attention, I would review the notes you took during class. Otherwise I would review any handouts or online material available that saved you from writing notes that day.
Mel

Similar Messages

  • Help - need advice on how to do this

    I have a form where a part number, qty received, and serial
    number are entered, and I generate a request number.
    (other information is entered as well, such as name, address,
    etc.) So it is one record per request number, easily done and no
    problems.
    Now I am told that for each request number, there could be
    multple part numbers and each part number may or may not have a
    serial number.
    I was thinking of splitting up the form and enter the name,
    etc. first, then when they submit, it inputs into a table then use
    cflocation to go to another screen, passing the reqeust nubmer, to
    enter the part number, qty, and serial number. If they check a box
    to indicate serial number, then I would like to autogenerate that
    many serial number entry lines based on the qty entered.
    Is there a better and more efficieint way to do this ? The
    part numbers and serial number are in a separate table so the part
    number will repeat but the serial numbers will be different.
    Thanks for any help or advice.

    Sounds like a shopping cart. I wouldn't store any data into a
    db or generate an order number until the user has indicated that he
    has finished entering data.
    You will probably have to take a good look at your database
    as well. You need a one to many relationship somewhere.

  • I am very new to mac products, I have a Mac Pro 13" I  need to learn how to use it ? looking video courses any will helpI

    I am very new to mac products, I have a Mac Pro 13" I  need to learn how to use it ? looking video courses any will help .....

    Go to www.apple.com for a start. See, also, Mac Basics.

  • I need to learn how to use all about java & mysql...help me!

    I have a situation here, I need to learn how to use java with mysql
    . Can I connect to a MYSQL DB with servlets?
    how can I build an e-mail server with java (no matter how difficult)
    please, I need help, and I really apreciate your help.
    thank you very much!!

    I have a situation here, I need to learn how to use
    java with mysql
    . Can I connect to a MYSQL DB with servlets?Yes... documentation to help you connect to any database can be found at http://java.sun.com/products/jdbc. To connect to MySQL, you'll need drivers (sourceforge.net), and the specific connection URL for those drivers will be included in the documentation.
    how can I build an e-mail server with java (no matter
    how difficult)If you're fairly new to JSP/Servlets, you may be in over your head here, since an email server is no easy application to code. Here's a link to the source code for the JAMES project... Apache's Java email server... maybe you can find some useful information there...
    http://www.ibiblio.org/pub/packages/infosystems/WWW/servers/apache/jakarta/james/source/

  • Need to learn how to create a slideshow in Flash

    Hello All,
    I'm new to Flash and I need to learn how to do a slideshow with exactly the same features as can be found in this link:
    http://www.esppromo.com/index.asp
    Just like at the link above, it needs to play through the slides automatically once the page is loaded, each slide needs to link to a specific URL, and I need controls similar to the boxes at the bottom so the viewer can click on any specific slide they wish to view (I'd like to have numbers in the boxes though). The transitions don't have to slide across like this. If a fade is easier, that would be fine.
    Since I've looked online, but can't find any tutorials for doing this in Flash Professional, I think I'll pick up a book on Flash. There are some online tutorials that are close but nothing that is exactly what I'm looking for.
    I'm just wondering if anyone can recommend a particular book that covers creating this type of slide show with the links and controls exactly as I need it to be. I see these types of slide shows on a lot of sites now, so I'm hoping that maybe someone else on this forum has had to learn how to do this and can recommend a book they used?
    I was looking at Adobe Flash Professional CS5 Classroom in a Book and it looked like it may be what I'm after, but I am rather cautious, as I don't want to end up with instructions that are close to what I am looking for, but not quite right.
    Actually, I thought I'd be able to do this fairly easily with Flash Catalyst, so I updated to Adobe CS5 Design Premium. I found that Flash Catalyst can be used to create a slide show like this, but unfortunately it won't play automatically when the page loads and the viewer has to manually click through the slides, which is not what I need. I could be wrong, but from what I've read, I need Flash Builder to add code so the slide show will play automatically if I create it in Flash Catalyst. Since it's not an option for me to buy more software at this time, I've decided to learn how to do this in Flash Professional.
    I really want to learn how to do this. I expect to go on and create more using Flash, but for now I just REALLY need to figure this slide show out.
    If anyone can help out, I'd really appreciate it!
    Thanks,
    William

    Edit:
    i'm sorry. it is a huge work to type this and will be confusing as hell. i'm already up to 1 full word page of explanation. Though i am able to do it, explaning it in full lengh is ... well.. very hard. Way harder than it is to make your flash itself.
    I can however point you to some element you should read about how to make them:
    - How to use timeline in flash cs4
    - how to create a button in flash cs4
    - How to make "CLASSIC TWEEN" in flash cs4
    - How to use ActionScript 2 ( AS2) basic command like : GetUrl, Gotoandplay, Stop and how to put those script in the right location. ( AS2 allow you to put script directly on the button itself. however it is best to put it in the Action Layer that you will have to build in the timeline.
    - How to import thing in library.
    keep in mind that what you want to make is mostly a Logic probleme...
    - Image 1 click = GetURL X,
    - After Y time, Switch image 1 to image 2 with animation. Do the same for the button.
    - If you click on button 1 while being on image 3, you have to set all the reverse animation in the timeline, and use a lot of Gotoandplay.
    Hope this help you a little.
    I'm sorry. i really wanted to help you do it, but it is just a monstruous job to write all this.

  • HT6154 Can someone please just help me figure out how to update this stupid phone without losing anything? I somehow have more than one Apple ID on this,but I just want my music and my pictures to stay and I'm terrified of losing these things.

    Can someone please just help me figure out how to update this stupid phone(iPhone 4)without losing anything? I somehow have more than one Apple ID on this,but I just want my music and my pictures to stay and I'm terrified of losing these things. I have a lot of music from old CDs on here,and for some reason I can't even transfer them manually onto my computer. I'm not tech savvy whatsoever. Someone please help,having my music is the the whole reason I still have this phone.

    First read about back http://support.apple.com/kb/ht1766
    Then  read on how to transfer photos to your computer http://support.apple.com/kb/ts3195
    Then
    UPDATING iOS
    Over the air updating of iOS needs iOS 5 or later so unless you have iOS 5 or later you will not see updating in setting
    The following link explains how to update http://support.apple.com/kb/HT4972
    This link explains how to update using wireless http://support.apple.com/kb/HT4623
    This explains how to transfer purchases to your computer http://support.apple.com/kb/ht1848

  • Hello, i am new to the mac and i need to learn how to re image using an external hard drive

    Hello, i am new, like baby fresh new,...lol, to the mac and i need to learn how to re-image using an external hard drive.

    How to replace or upgrade a drive in a laptop
    Step One: Repair the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger, Leopard or Snow Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    Step Two: Remove the old drive and install the new drive.  Place the old drive in an external USB enclosure.  You can buy one at OWC who is also a good vendor for drives.
    Step Three: Boot from the external drive.  Restart the computer and after the chime press and hold down the OPTION key until the boot manager appears.  Select the icon for the external drive then click on the downward pointing arrow button.
    Step Four: New Hard Drive Preparation
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your new hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID  then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Step Five: Clone the old drive to the new drive
    1. Open Disk Utility from the Utilities folder.
    2. Select the destination volume from the left side list.
    3. Click on the Restore tab in the DU main window.
    4. Check the box labeled Erase destination.
    5. Select the destination volume from the left side list and drag it to the Destination entry field.
    6. Select the source volume from the left side list and drag it to the Source entry field.
    7. Double-check you got it right, then click on the Restore button.
    Destination means the new internal drive. Source means the old external drive.
    Step Six: Open the Startup Disk preferences and select the new internal volume.  Click on the Restart button.  You should boot from the new drive.  Eject the external drive and disconnect it from the computer.

  • I do not know how to get the music that I buy on itunes, on my mac, onto an ipod. I have already authorized my computer and "downloaded" my music, but that did not do anything. Please I really need to know how to do this on my own but I am stuck.Thank you

    I do not know how to get the music that I buy on itunes, on my mac, onto an ipod. I have already authorized my computer and "downloaded" my music, but that did not do anything, or provid the results that I was expecting, at least. Please, I really need to know how to do this on my own but I do not know what to do.Thank you in advance to anyone that is answering this question that I know most everyone but me knows how to accomplish. thanks!!!

    In iTunes go to the Help menu in the upper menu bar.  Then click on iTunes Help. Then on Sync your iPod, iPhone or iPad and follow the instructions.

  • I have an Iphone 4S and it looks like I connected my iphone to my computer and need to know how I undo this.

    I have an Iphone 4S & it looks like I connected my iphone to airplay on my computer and I need to know how to undo this.Can anyone help me?

    Getting back is hard, but go to Settings > Mail, Contacts, Calendars and under Calendars check the time for syncing...set that as far back as you can, the default is one month.

  • I need to learn how to use jump lists.

    '''bold text'''I need to learn how to use jump lists. acording to all that I have muddled thru my ereader will only download books I have purchased and free ones if I use a jump list. I don't know how. If this is the correct method for ereaders downloads someone please explain it, simply to me. I have a reader I am totally unable to use. I have read the manual many times. That info doesn't work.

    How is that related to Firefox support?

  • Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank

    Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank
    We like FusionFx Style but would like to keep the background white like blafp style.

    Can you be a little more descriptive on what you need here and explain what exactly you want to be changed.

  • Help Needed - My BB 8520 Curve has this message-CRTranRec::GetLinkedRecordID:Invalid linked record id while sychronisation using the desktop software

    Hi!
    Need some help with the same:
    Help Needed - My BB 8520 Curve has this message-CRTranRec::GetLinkedRecordID:Invalid linked record id while sychronisation using the desktop software

    Hi sameer197301 and welcome to the BlackBerry Support Community Forums!
    To clarify, are you seeing this message displayed on your BlackBerry® smartphone or on your computer?
    Thanks.
    -CptS
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • I must purchase a photo editing tool and don't know if I should go with Photoshop or Lightroom. I need to learn how to do basic photo editing on pictures used for a news website. Thoughts? Thanks!

    I must purchase a photo editing tool and don't know if I should go with Photoshop or Lightroom. I need to learn how to do basic photo editing on pictures used for a news website. Thoughts? Thanks!

    Hi scienceiscool,
    You can go ahead with the photography plan as mentioned in the link below:
    https://creative.adobe.com/plans/photography?promoid=KLXML
    Kindly refer to the link below to get used to the application better:
    Photoshop CC tutorials from novice to expert
    Regards,
    Sheena K

  • I Need to know how to do this!

    I am needing to know how to do this. Is there a plugin for dreamweaver to do this, and what is this called
    At the top click on "SCHEDULE A TOUR" or "REQUEST BROCHURE" The window it opens is what I am needing to know
    http://www.thesolana.com/

    That site appears to be using Shadowbox
    http://www.shadowbox-js.com/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics |  Print | Media Specialists
    www.alt-web.com/

  • I need to learn how to manage pictures on my I-pad.  I get multiples of pics taken and many that cannot be deleted.

    I need to learn how to manage pictures on my I-pad.  I get multiples of pictures taken & there are pictures I want to delete but can't.

    If you're syncing with iTunes, you'll have to un-sync to remove the ones you want to take off.
    Manually managing content with iTunes

Maybe you are looking for

  • A6430f Pavilion, Turn into Boat Anchor, help

    First off here are my system spec's: It's an HP Pavilion a6430f OS Name Microsoft® Windows Vista™ Home Premium Version 6.0.6001 Service Pack 1 Build 6001 Other OS Description Not Available OS Manufacturer Microsoft Corporation System Name LINNEA-PC S

  • Can't change pemissions.

    Hi, I created a role containing a KM Navigation iView to a key user to let him change the permissions of his repository by himself. He has full control access to his repository but when he clicks on the permissions button the screen that comes up sho

  • Can't hear the words

    I just got my nano, subscribed to itunes, and I connected the two and the songs were uploaded to my nano, I can hear the music but not the words, what am I doing wrong?

  • Games cannot be launched resulting in no response from iPod

    I tried to open a game resulting in my iPod classic freezing and ubale to reset. It also doesn't show up in iTunes.

  • Silverlight not working on 2012 R2 RDS host

    Versions: 2012 R2 Server as RDS host IE 11.0.9600.16518 Silverlight 5.1.20913.0 Firefox 27.0.1 A department needs access to a Silverlight application hosted here https://client.capturerx.com/cumulus I'm moving this department from 2003 Terminal Servi