Liitle help is needed

I have created two classes but have an issue with the testdriver.
Can someone let me know what the problem is?
This is my class Person
package pet;
public class Person
private String name;
private String weight;
private String sex;
private MyDate birthDate;
public Person(String name, String weight, String sex, MyDate birthDate)
this.name=name;
this.weight=weight;
this.sex=sex;
this.birthDate=birthDate;
public String getName()
  return name;
public String getWeight()
  return weight;
public String getSex()
  return sex;
public MyDate getBirthDate()
  return birthDate;
public String toString()
  return" General Person Information:\n" +
  "Name:   "     + name + "\n" +
  "Weight: "     + weight +"\n" +
  "Sex:    "     + sex    + "\n" +
  "BirthDate: "  + birthDate.toString();
}this is my second class MyDate
package pet;
public class MyDate
private String day;
private String month;
private String year;
public MyDate(String day, String month, String year)
  this.day=day;
  this.month=month;
  this.year=year;
  public String getDay()
   return day;
  public String getMonth()
    return month;
  public String getYear()
   return year;
Finally, this is my testdriver
import java .io.*;
import pet.Person;
import pet.MyDate;
public class PersonTestDriver
  public static void main(String [] args)
   String name="Peter";
   String weight="180";
   String sex="Male";
   String day="10";
   String month="August";
   String year="2007";
   Person p = new Person(name, weight, sex, MyDate birthDate, day, month, year);
   System.out.println(p.toString() );
}Any help is greatly appreciated.

atleb,
Might I also suggest...
  public String toString() {
    return ("<person"
    +" name=\""+name+"\""
    +" weight=\""+weight+"\""
    +" gender=\""+gender+"\""
    +" birthDate=\""+birthDate+"\""
    +" />");
  }because it's a standard format it's actually useful.
PS: The code you posted (all classes) are riddled with simple syntax errors... I expect you've got some work to do yet just ironing the errors out of it.
Good luck. Keith.

Similar Messages

  • My phone 5s did the new update and will not come back on. I already tried hard reboot still won't work. Been over a hour now. Please someone help I need my phone.

    My phone 5s 16gb gold did the new update and will not come back on. I already tried hard reboot still won't work. Been over a hour now. Please someone help I need my phone.   This phone is not even 6 months old been in case no scratches. This is driving me crazy.

    Connect your phone to a computer and restore your software using iTunes.

  • In the new mail app for OSX v10.7 Lion it seems I can only setup my gmail account as an "imap", when I need to set it up as "pop"... PLZ HELP I NEED MY MAIL TO WORK!!!

    In the new mail app for OSX v10.7 Lion it seems I can only setup my gmail account as an "imap", when I need to set it up as "pop"... PLZ HELP I NEED MY MAIL TO WORK!!!

    Go to System prefs
    Select Mail Contacts and Calendars
    Then select Other
    Then select "Add a Mail Account and click create
    Then go to google for the settings you need:
    First here for the settings online at gmail http://tinyurl.com/du3fu
    Then here for the setting in mail http://tinyurl.com/38fevm8
    These are instructions for Mail 4.0 but all of the necessary settings should be listed.

  • Help, I need to run three displays on my Mac Pro 4,1.

    Help, I need to run three displays on my Mac Pro 4,1.
    I have a Radeon 5870 installed with OS X 10.8.3
    need to run a Dell 30 inch dislay, a 19 inch Eizo and a 12 inch Cintiqu Display Tablet please.
    Ant tipes or hints?  Failing that, I would like to know of a comptaible video/graphic card which will only take up an additional slot, as I have the others filled with eSata and USB 3 cards.
    Cheers
    David

    Your 5x70s support three monitors. Are you having trouble?
    Answered just last night in this thread also
    https://discussions.apple.com/thread/4933924?tstart=0

  • Windows XP Clean Install – What I discovered and the help I need

    Windows XP Clean Install – What I discovered and the help I need
    I previously had a problem with my Laptop dying randomly you can read about it in the thread entitled Computer dies Randomly (Battery also dead) click to view
    Before I realised the solutions, I thought that maybe my Laptop had become infected with a Virus and decided it would be prudent to do a clean install of the Windows XP operating system.
    Everything went perfectly and thought a clean install was a good opportunity to download the “XP Service Pack 3” SP3 and did so, it seemed very quiet though and that’s when I realised I had no sound…
    I downloaded all of the sound drivers I could find on the Lenovo site for 3000 N100 (I knew from previous experience that the “SOUNDMAX” driver is the only one that actually works with this 3000 N100) in order to install this you have to install the Realtek HD audio driver, but in order to install that you have to install some other Driver/Soft that only works with SP1 or SP2 if you try to install it with SP3 it will say that you don’t need the file as your Service pack is newer than the file you want to install, this is understandable as SP3 is not final as of yet (but it’s good to know).
    My next problem was that my extra RAM was not detected, this was fixed by updating the BIOS, after installing all of the System updates, PC Doctor, everything I could find for 3000 N100 I decided to rest, I pushed the Lenovo care button and it did not work, I found a hot key driver and installed it but still the Lenovo care button does not work, previously when I pushed this button it would bring up the Lenovo menu but now it’s just a dead button, Does anyone know how to get this button working again?
    I am pretty sure that everything else is working fine now, just that button not working is very annoying, is there a set routing of installs you must do to get everything working, i.e. bios 1st audio 2nd system update 3rd etc...
    Please help, I hope I have helped you...
    Message Edited by DrunkenNinja on 05-07-2008 03:38 AM
    Message Edited by DrunkenNinja on 05-07-2008 03:38 AM
    Solved!
    Go to Solution.

    Ok first everything works now... except the Lenovo Care button, I just posted the other stuff cause it might help other members,  I have searched the forum for an anwser to this problem but there was only one anwser (suggesting to uninstall the driver restart and re-install it) and it did not result in a working Lenovo Care button...
    I don't beleive the Lenovo keyboad drivers are in any way related to the Service pack 3 as they do not use the Service pack files, to back this up I also had the same problem when Service Pack 2 was installed...
    The Lenovo Care button works fine on Boot up screen to access the rescue and recovery software (So the mechanics of the button are fine) but once Windows XP loads it is just a dead button, I remember it used to open up the Lenovo Care Start bar, I got it working once in the past but I can't remember what I did, I thought someone here might know the anwser...

  • I have a new Ipad and when I try to buy an app it asks for my  questions! I dont remember them so I press the button that send me an email to reset them. Ive sent it various times but it doesnt arrive. please help I need this app for school!!!

    I have a new Ipad and when I try to buy an app it asks for my  questions! I dont remember them so I press the button that send me an email to reset them. Ive sent it various times but it doesnt arrive. please help I need this app for school!!!

    See Kappy's great User Tips.
    See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities https://discussions.apple.com/docs/DOC-4551
    Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/HT5312
    Send Apple an email request for help at: Apple - Support - iTunes Store - Contact Us http://www.apple.com/emea/support/itunes/contact.html
    Call Apple Support in your country: Customer Service: Contacting Apple for support and service http://support.apple.com/kb/HE57
     Cheers, Tom

  • I am using windows 7 and itunes 11.7 my i phone 5s is not getting synced with my laptop it keeps showing backing up  please help i need to put music in my phone?

    i am using windows 7 and itunes 11.7 my i phone 5s is not getting synced with my laptop it keeps showing backing up  please help i need to put music ?

    Hi,
    Have you managed to solve this problem? if yes, please highlight how you solved it...i'm facing same problem with my new Iphone 5S but udner Windows, thanks.

  • I recently purchased a Canon 7D. I own Adobe Photoshop/Bridge CS5. I cannot open my raw images in Bridge. I have tried to download the plug in but does not seem to work. Please Help, I need to be able to open my raw images in Bridge ASAP. I do not want to

    I recently purchased a Canon 7D. I own Adobe Photoshop/Bridge CS5. I cannot open my raw images in Bridge. I have tried to download the plug in but does not seem to work. Please Help, I need to be able to open my raw images in Bridge ASAP. I do not want to upgrade to CS6 at this time.

    If you had given us sensible information, I could look it up for you if your efforts fail.
    Right now, I don't even know if you are on a Mac or on a Windows box.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • My BB9810 refuse to load OS7.1 software on my phone after the download has completed. My phone has freezed/stucked since morning. Pls urgent help/assistant needed as I can not access/use my phone for over 24hrs now.

    My BB9810 refuse to load OS7.1 software on my phone after the download has completed. My phone has freezed/stucked since morning. Pls  urgent help/assistant needed as I can not access/use my phone for over 24hrs now.

    Hi there,
    Use the method described in the link below to get back up and running:
    http://supportforums.blackberry.com/t5/Device-software-for-BlackBerry/How-To-Reload-Your-Operating-S...
    I hope this info helps!
    If you want to thank someone for their comment, do so by clicking the Thumbs Up icon.
    If your issue is resolved, don't forget to click the Solution button on the resolution!

  • Help urgently needed, I have installed Logic Pro 9, since then my Final Cut Pro X keep freezing. Anyone what is wrong and how to solve it? I desperately need help on this. Thanks

    Help urgently needed, I have installed Logic Pro 9, since then my Final Cut Pro X keep freezing. Anyone what is wrong and how to solve it? I desperately need help on this. Apple support says I have to pay £85 for to help me. Thanks

    Just a word of advice. Never ever use the word "urgent" on this forum

  • Please Help , I Need semicolon ; after TABLESPACE "MFEED_DATA"

    Hi All,
    please Help , I Need semicolon ; after TABLESPACE "MFEED_DATA"
    as I am getting ; like below example
    select dbms_metadata.get_ddl('TABLE', 'A') || ';' As Result
    from dual;
    CREATE TABLE "MFEED"."A"
    (     "A" NUMBER
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "MFEED_DATA"
    regards,

    Hi,
    well, I don´t know if this works for any table, but I tried two of mine and it was ok:
    select substr(dbms_metadata.get_ddl('TABLE', '<table_name>'), 1,
    length(dbms_metadata.get_ddl('TABLE', '<table_name>') || ';')-4)|| ';' As Result
    from dual;
    If the string gets too long, you must use dbms_lob - functions for string manipulation, but for "normally sized" tables, it should work.
    Regards,
    Gerd
    Message was edited by: Gerd
    OK, Jens has the perfect solution - forget mine!
    gerd_99

  • Please help i need a sourcecode i think it�s easy

    Please help
    i need the source code
    for a programm
    which should ask me for a number
    for instance: "7"
    and then should the programm write "seven"
    please help

    I wrote it as a test some time ago:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class N2t extends Frame 
         Panel pr = new Panel();
         TextField fin = new TextField(20);
         Label     fot = new Label();
         Button    but = new Button(" Go ");
         Vector    vy  = new Vector();
         Vector    va  = new Vector();
         Vector    vh  = new Vector();
    public N2t()
         super();
         setBounds(10,10,550,200);     
         addWindowListener(new WindowAdapter()
        {     public void windowClosing(WindowEvent ev)
                   dispose();     
                   System.exit(0);
         pr.setBackground(Color.pink);
         add(pr);
         pr.setLayout(null);
         fin.setBounds(10,20,100,20);
         fot.setBounds(10,50,500,20);
         fot.setBackground(Color.white);
         but.setBounds(10,90,100,20);
         pr.add(fin);
         pr.add(fot);
         pr.add(but);
           setVisible(true);
         vy.add("");
         vy.add("one");
         vy.add("two");
         vy.add("three");
         vy.add("four");
         vy.add("five");
         vy.add("six");
         vy.add("seven");
         vy.add("eight");
         vy.add("nine");
         vy.add("ten");
         vy.add("eleven");
         vy.add("twelve");
         vy.add("threaten");
         vy.add("fourteen ");
         vy.add("fifteen");
         vy.add("sixteen");
         vy.add("seventeen");
         vy.add("eighteen");
         vy.add("nineteen");     
         va.add("twenty");     
         va.add("threaty");
         va.add("fourty ");
         va.add("fifty");
         va.add("sixty");
         va.add("seventy");
         va.add("eighty");
         va.add("ninety");     
         vh.add("");
         vh.add("Tousend");
         vh.add("Milion");
         but.addActionListener(new ActionListener()
         {     public void actionPerformed(ActionEvent be) 
                   calc();
    private void calc()
         int i=0, m=0, y;
         try
               i = Integer.parseInt(fin.getText());
         catch(NumberFormatException e) {return;}
         String txt = "";
         while (i > 0)
              y = i%1000;
              i = i/1000;
              if (y > 0) txt = calcI(y)+" "+(String)vh.get(m)+" "+txt;
              m++;
         fot.setText(txt);     
    private String calcI(int i)
         String txt = "";
         if (i > 99)
              txt = (String)vy.get(i/100)+" Hundred ";
              i = i%100;
         if (i > 19)
              i = i - 20;
              int a = i / 10;
              i = i - (a * 10);
              txt = txt+(String)va.get(a)+" ";
         return(txt+(String)vy.get(i));     
    public static void main (String[] args)
         new N2t();  
    Noah

  • Please help I need to rest the deleted history

    Please help I need to rest the deleted history

    rest??
    Did you mean "restore"?
    Sorry, if you deleted your browsing history it is gone. No backups are made for browsing history, unless you have that set that up in a 3rd party application. Or if you have a backup of the places.sqlite file, which is where that data is stored in Firefox.

  • HELP! Need to add TIMECODE

    can someone please help
    I need to add a timecode to an FLV
    I added all the other controls and tied them to teh playback
    with AS but for teh life of me cannot figure this out
    Thank you all

    use:
    minus_btn.addEventListener(Event.MouseEvent,CLICK, clear)
    function clear(e:MouseEvent){
    var sql:SQLStatement = new SQLStatement();
    sql.sqlConnection = conn;
    var s:String = "DELETE from contacte WHERE nume= :numeparam AND telefon=:telefonparam";
    sql.text = s;
    sql.parameters[":numeparam"] = whatever;
    sql.parameters[":telefonparam"] = whatever else;
    //add listeners if you want
    sql.execute();

  • Please a need help, I need my serial njumber, they said is in the coner but not is 0 there.

    I need help, I don't have serial number, so I have a lots of truable to get any the adobe

    please I need help, I tray to call up so many times
    Date: Sun, 27 Apr 2014 02:00:21 -0700
    From: [email protected]
    To: [email protected]
    Subject: please a need help, I need my serial njumber, they said is in the coner but not is 0 there.
        Re: please a need help, I need my serial njumber, they said is in the coner but not is 0 there.
        created by Rajshree in Adobe Creative Cloud - View the full discussion
    Please refer to http://helpx.adobe.com/x-productkb/global/find-serial-number.html
    If you have Creative Cloud then it does not need not serial, you have to just log in to www.creative.adobe.com & download & install from there.
    Regards
    Rajshree
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6334115#6334115
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6334115#6334115
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6334115#6334115. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Adobe Creative Cloud at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

Maybe you are looking for

  • How can I create a temporary password for a user?

    I often have to reset passwords for users who forget their passwords.  Is there a way, in Mac OS X Server 10.6, to reset the password to a temporary password and then require the user to change passwords on login?  (Not for a new user- I've found tha

  • Synched video doesn't appear on iPod

    I tried converting some mpegs and noticed they played ok in iTunes but didn't even appear on the 30 GB video iPod (though they showed up on the iPod's listing under iTunes). Thinking there was something wrong w/ the conversion (some spec that was off

  • New computer, downloaded a program and it now will not uninstall program

    I recently just bought this laptop and I downloaded Windows Office 365 proplus, (basically it says office 2013 version in all of the programs,)  package from my schools website for me to do school work.  I ran into an issue first with being able to l

  • RE: Do you need to render all HD video before playback?

    Hello, Sorry if this is an easy one, but I'm new to FCP and I sat down to cut something today and after I dropped the first clip into the timeline, the red bar appeared and it wouldn't play without being rendered. Thank you for your time, Barry

  • NWCE 7.2 SP

    Hi All,   I have download NWCE 7.2 Trial Version from SDN. By Default the service pack is SP01. Hence i want to install SP03 .Is that Possible...? Please help me.. Thanks, Arun