Can you tell me what should I modify to fix error with constructor coding

public class Address{
     private String street;
     private String city;
     private String state;
     private String zipcode;
     public Address(String addressStreet, String addressCity,
          String addressState, String addressZipcode){
          street = addressStreet;
          city = addressCity;
          state = addressState;
          zipcode = addressZipcode;
     } // end constructor
     public String getStreet(){ return street;}
     public String getCity(){ return city;}
     public String getState(){ return state;}
     public String getZipcode(){ return zipcode;}
     public String toString() {
     String addressObject = street+ "," + city + "," + state + "," +zipcode;
     return addressObject;
Second class AddressBookEntry
public class AddressBookEntry{
     private String name;
     private Address address;
     public static int entriesCount = 0;
     public AddressBookEntry(String entryName,Address addressObject){
          name = entryName;
          address = addressObject;
     public AddressBookEntry(String entryName, String entryStreet,     String entryCity,
                                   String entryState, String entryZipcode){
          name = entryName;
          address.street = entryStreet;
          address.city = entryCity;
          address.state = entryState;
          address.zipcode= entryZipcode;
          entriesCount++;
     public void setName(String entryName){name = entryName;}
     public void setStreet(String entryStreet){address.street = entryStreet;}
     public void setCity(String entryCity){     address.city = entryCity;}
     public void setState(String entryState){address.state = entryState;}
     public void setZipcode(String entryZipcode){address.zipcode = entryZipcode;}
     public String getAddress(String entryName){return address.toString();     }
     public String getName(){return name;}
     public String toString(){
          String addressString = address.getStreet() + "\n"
                    + address.getCity() + "\n"
                    + address.getState() + "\n"
                    + address.getZipcode() +"\n";
          return addressString;
     public static int getEntriesCount(){ return entriesCount;}
Driver Class
import javax.swing.*;
public class AddressBookApp{
public static void main (String args[]){
     String choice = "";
     while(!(choice.equalsIgnoreCase("x"))){
          String name = JOptionPane.showInputDialog("Enter name : ");
          String streetAddress = JOptionPane.showInputDialog("Enter street address : ");
          String city = JOptionPane.showInputDialog("Enter city : ");
          String state = JOptionPane.showInputDialog("Enter state : ");
          String zipcode = JOptionPane.showInputDialog("Enter zipcode : ");
          AddressBookEntry bookEntry = AddressBookEntry(name,street,city,
                                                  state,zipcode);
          String message = "Name : " bookEntry.getName() "\n"
               + "Address : \n"+bookEntry.toString();+ "\n"
               +"Press Enter to continue or 'x' to exit.";
          choice = JOptionPane.showInputDialog(message);
System.exit(0);
Error Message
AddressBookEntry.java:14: street has private access in Address
          address.street = entryStreet;
I'm getting errors like this.Can anyone tell what I should do

Why did you stop using [code][/code] tags?
I fixed the error by creating package.But still I get
error.
Error Message :
AddressBookApp.java:13: cannot resolve symbol
symbol : class AddressBookEntryWhen you created the package, did you distribute compiled class files into them, and then add the directory above the package directory into your classpath?
It looks like the compiler can't find the classes you're referring to.

Similar Messages

  • Well.., I'd like to refer the iPone 4S. However, my living place is in the Launceston in which Tasmania does not Apple store. So, can you tell me what should i do?

    **** Apple officers,
    I'm MinKyung Han who live in the Launceston. Actually, i have a question about the iPone 4S refer bushed becaues my iPone have techical erorrs, and it still expose amount of thermal energy in which lack of capacities in the battery. Also, I have not too many use the iPone, but it still hot in battery area. It is so dangerious for me.Thus, I would like to refer my iPone 4s if i can. However, alredy you know, I live in Launceston, Tasmania, where I cannot find Apple store. So, can you tell me what sould i do? such I need to send a parcel which included the iPone for you guys?
    Thank you
    MinKyung Han

    Tom, is it acceptable to use FCP7 Log & Transfer when importing card media (like I have been doing in the past) and then close FCP7 and open FCPX and import those ProRes clips - since they're in the RAID, already labeled and trimmed, and already "optimized"?  Does that sound like something that will work for me and work with FCPX?

  • I am using Mavericks. I had a list of VIPS and used it extensively. Now it has disappeared and VIPs on the menu bar is faded. There is nil response to VIP in help. Can you tell me what has happened?

    I am using Mavericks. In Mail I had a list of VIPS and used it extensively. Now it has disappeared and VIPs on the menu bar is faded. There is nil response to VIP in help. Can you tell me what has happened?

    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Mail/V2/MailData/VIPSenders.plist
    Right-click or control-click the highlighted line and select
    Services ▹ Show Info in Finder (or just Show Info)
    from the contextual menu.* An Info dialog should open.
    Does the dialog show "You can read and write" in the Sharing & Permissions section?
    In the General section, is the box labeled Locked checked?
    What is the Modified date?
    If you don't have read and write access to the item, change the settings as directed here. Note, however, that if one file has wrong access settings, most likely others do as well. If the item is locked, unlock it.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.

  • Is there any Sound card 5.1 include stereo mix that working with MacBook Air such as Creative Labs SoundBlaster X-Fi Surround 5.1 Pro Entertainment System ? and if there any another sound card can you tell me what is it please ? Thank you.

    Is there any Sound card 5.1 include stereo mix that working with MacBook Air such as Creative Labs SoundBlaster X-Fi Surround 5.1 Pro Entertainment System ? and if there any another sound card can you tell me what is it please ? Thank you.

    Okay, I did my best searching and I couldn't find anything that matched all your descriptors. I did do a search on both decoder numbers. SB0256 returned very little results, but with SB0466, I was able to find this ebay listing:
    http://cgi.ebay.com/ws/eBayISAPI.dll...6_fvi%3D&_rdc=
    This card isn't a Champion like you suggested. And with my complete lack of knowledge, I don't know what I/O dri've bay means. But since it is PCI and the decoder matches the number you gave me, this card should be adequete, right?
    Whether it works or not, my search indicated it might be very hard for me to find that card (or any PCI card for that matter). Everything I saw was out of stock. I know this is a forum for Creative, but are there any other manufacturers that will allow me to accomplish my goal, either with current cards, or discontinued cards? Thanks again
    Oh, and I will vote on that thread. I probably won't wait for them to release the decoder since I need it now, but I still believe Creative should be giving the customer what they want

  • Help! We have a form with more than 200 entries and when I looked at it yesterday it had one! When you download the form to excel they all show up. However, when I added another record today it disappeared. Can you tell me what's happening? I've been usin

    Help! We have a form with more than 200 entries and when I looked at it yesterday it had one! When you download the form to excel they all show up. However, when I added another record today it disappeared. Can you tell me what's happening? I've been using adobe forms for 2 years with mass response feedback and have never had this problem.

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • "CAHeadless error Sequence.cpp-2233" after computer starts up.  Can you tell me what this is or how to fix it?  Thanks!

    Since installing Adobe Premier Elemnts 12 I get a message that says "CAHeadless error Sequence.cpp-2233" after computer starts up.  Can you tell me what this is or how to fix it?  Thanks!

    If you are using Firefox 3.6.6 version, open Tools > Options >> Advanced - Network
    The under Connections hit the Settings button - then select '''No proxy''' at the top of those settings. Restart Firefox and you should be all set.
    ''(3.6.6 added a new setting there - Use system proxy settings and sets that as the Default setting)''

  • Can you tell me what to do? "This iPad has not been backed up in 4 weeks.Back ups happen when this iPad is plugged in locked and connected to Wi-Fi" What do I do?

    Can you tell me what I should do? My iPad shows the following message, " This iPad has not been backed up in 4 weeks. Back ups happen when this iPad is plugged in locked and connected to Wi-Fi"  Thank you in anticipation you will be able to help me, Ray Mill.

    Try a reset. Hold the Sleep and Home button down (together) for about 10 seconds until you see the Apple logo. Ignore the red slider.

  • I keep getting this error in Dreamweaver when I am trying to upload my website?  Can you tell me what I am doing wrong?  here is the error message: /html - error occurred - Unable to create remote folder /html.  Access denied.  The file may not exist, or

    I keep getting this error in Dreamweaver when I am trying to upload my website?  Can you tell me what I am doing wrong?  here is the error message: /html - error occurred - Unable to create remote folder /html.  Access denied.  The file may not exist, or there could be a permission problem.   Make sure you have proper authorization on the server and the server is properly configured.  File activity incomplete. 1 file(s) or folder(s) were not completed.  Files with errors: 1 /html

    Nobody can tell you anything without knowing exact site and server specs, but I would suspect that naming the folder "html" wasn't the brightest of ideas, since that's usually a default (invisible) folder name existing somewhere on the server and the user not having privileges to overwrite it.
    Mylenium

  • Can you tell me what i pay for. From my visa account itunes is collecting money on 15 sept, 4 sept, 1 sept etc and i do not know for what. I have not download  apps i have to pay for

    Hello, can you tell me what i pay for. Itunes is collecting money form my visa on certain days of the month (for example on 15 september, on 12 september on 1 september etc). I have not downloaded apps for which i have tp pay. Do i have done something wrong or what???

    It sounds like you may have subscriptions.
    If you want to view your app subscriptions:
    From your device's Home screen, tap App Store.
    Tap Featured at the bottom of the screen.
    Scroll to the bottom of the page.
    Tap the Apple ID button in the lower-left corner. (If you are not signed in, tap the Sign In button, and sign in with your Apple ID. Then, scroll back to the bottom of the page, and tap the Apple ID button.)
    Tap the View Apple ID button.
    Enter your password and tap OK.
    From the main account page, scroll down and tap Manage App Subscriptions. If you don't have app subscriptions this button will not be displayed.
    You'll then be taken to your App Subscriptions page.
    To turn off auto-renewal:
    From your Manage App Subscription page, choose an app subscription. 
    Tap the subscription category for which you want to disable auto-renewal.
    Tap On to toggle the switch to Off.
    You'll receive a confirmation message; tap Turn Off to confirm your choice.
    To turn off auto-renewal on computer:
    Launch iTunes on your computer.
    Choose Store > Sign In from the iTunes menu.
    Enter your Apple ID and password when prompted.
    Choose Store > View My Account. You may be asked to re-enter your Apple ID password. Click View Account .
    From the Account Information screen, scroll to the bottom of the page to the Settings section.
    Click Manage to the right of Subscriptions.
    From the Manage Subscription screen click on the subscription that you would like to manage.
    On the Edit Subscription screen, you will see the current subscription status and subscription details.
    Click the Off radio button to turn off Auto-Renewal.
    You will see a confirmation window asking you to confirm.
    Click Continue to proceed.
    Note: When you turn off auto-renewal, you will no longer continue to be billed for your subscription, however your subscription will continue until it expires.

  • Can you tell me what is the function modue to get POPUP box

    Hi Folks,
    can you tell me what is the function module to get the POPUP box.
    Thanks in Advance,
    Lakshmi

    Hai use
    POPUP_TO_CONFIRM
    check the following Code
    CONCATENATE 'Send selected spools to the: '
                 altdest
                ' Printer.' INTO V_TXTQUES SEPARATED BY SPACE.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
      EXPORTING
        TITLEBAR                    = C_TITLEBAR
      DIAGNOSE_OBJECT             = ' '
        TEXT_QUESTION               = V_TXTQUES
      TEXT_BUTTON_1               = 'Ja'(001)
      ICON_BUTTON_1               = ' '
      TEXT_BUTTON_2               = 'Nein'(002)
      ICON_BUTTON_2               = ' '
      DEFAULT_BUTTON              = '1'
       DISPLAY_CANCEL_BUTTON       = ' '
      USERDEFINED_F1_HELP         = ' '
       START_COLUMN                = 6
       START_ROW                   = 6
      POPUP_TYPE                  =
      IV_QUICKINFO_BUTTON_1       = ' '
      IV_QUICKINFO_BUTTON_2       = ' '
      IMPORTING
        ANSWER                      = D_ANSWER
    TABLES
      PARAMETER                   =
    EXCEPTIONS
       TEXT_NOT_FOUND              = 1
       OTHERS                      = 2.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF D_ANSWER = '1'.
    Thanks & regards
    Sreenivasulu P

  • Can you tell me what this code does?

    Can you tell me what this code does?
    import java.io.*;
    class Assignment1
    public static String[][] tdi = {     {"Paris", "418", "Rome", "55"},
                             {"Liverpool", "121", "Copenhagen", "35"},
                             {"Liverpool", "418", "Paris", "50"},
                             {"Liverpool", "553", "Frankfurt", "55"},
                             {"Frankfurt", "553", "Budapest", "50"},
                             {"Amsterdam", "121", "Madrid", "65"},
                             {"Amsterdam", "418", "Paris", "35"},
                             {"Madrid", "121", "Stockholm", "90"},
                             {"Budapest", "553", "Warsaw", "30"},
                             {"Copenhagen", "121", "Amsterdam", "35"},
                             {"Rome", "418", "Amsterdam", "60"},
    //--Start Method--
    public static void main( String args[] ) throws IOException
    System.out.println("Welcome to NoWings Airline.");
    InputStreamReader input = new InputStreamReader(System.in);
    BufferedReader keyboardInput = new BufferedReader(input);
    System.out.println("Please enter the airport you wish to depart from:");
    String[] info = TDIDLL.searchDest( keyboardInput.readLine() );
    if (info == null)
    System.out.println("Sorry, no plane to this destination");
    else
    System.out.println(info[0]+" departing at platform "+info[1]); }}
    public static String[] searchDest( String dest )
    String[] result = null;
    for(int i = 0; i < tdi.length; i++)
         if (tdi[1].equals(dest)) {
         result = new String[2];
         result[0] = tdi[i][0];
         result[1] = tdi[i][2];
         return result;
    return result; }
    // Info Method //
    // Fly Method //
    // Exit Method //
    Thanks. Also, can you tell me where I have gone wrong in the code.
    Much appreciated.

    Can you tell me what this code does?Why don't you run it and find out for yourself?

  • On my new iPad under the space category it shows I have 5.5gb occupied by 'Other" data - Can you tell me what this is exactly and how can I reduce it Thank-you

    On my new iPad under the space category it shows I have 5.5gb occupied by 'Other" data - Can you tell me what this is exactly and how can I reduce it
    Thank-you

    How Do I Get Rid Of The “Other” Data Stored On My iPad Or iPhone?
    http://tinyurl.com/85w6xwn
    With an iOS device, the “Other” space in iTunes is used to store things like documents, settings, caches, and a few other important items. If you sync lots of documents to apps like GoodReader, DropCopy, or anything else that reads external files, your storage use can skyrocket. With iOS 5, you can see exactly which applications are taking up the most space. Just head to Settings > General > Usage, and tap the button labeled Show All Apps. The storage section will show you the app and how much storage space it is taking up. Tap on the app name to get a description of the additional storage space being used by the app’s documents and data. You can remove the storage-hogging application and all of its data directly from this screen, or manually remove the data by opening the app. Some applications, especially those designed by Apple, will allow you to remove stored data by swiping from left to right on the item to reveal a Delete button.
     Cheers, Tom

  • Can you tell me what is a pass code for re setting program and where can I find it?

    Can you tell me what is a pass code for re setting program and where can I find it?

    For resetting what program? What are you trying to do? When you have a problem, please provide enough info to answer.
     Cheers, Tom

  • I bought Adobe Design & Web Premium CS6 from an online store. I try to install the program but it pup out said to Adobe support manager. I try to key in the serial number but always fail. Could you tell me what should I do? Thanks!

    I bought Adobe Design & Web Premium CS6 from an online store. I try to install the program but it pup out said to Adobe support manager. I try to key in the serial number but always fail. Could you tell me what should I do? Thanks!

    using Google to read reviews, I would not buy from that site Google
    added... click the google link I provided and do some reading about that site
    When you buy from another site instead of direct from Adobe you need to check first to be sure the site is an authorized reseller (such as Amazon)
    You are now going to have to get support from the place you bought if the serial number you were given by that site does not work

  • HT4623 I Have Iphone 3G, But There Is Not Here Software Update Option.. Can You Tell Me What Can I Do?

    I Have Iphone 3G, But There Is Not Here Software Update Option.. Can You Tell Me What Can I Do?

    Muhammad Tariq Khan wrote:
    I Have Iphone 3G, ...
    The iPhone 3G can only update as far as iOS 4.2.1
    Muhammad Tariq Khan wrote:
    ... There Is Not Here Software Update Option..
    that is Only a feature of iOS 5 or later.

Maybe you are looking for

  • Why am I being charged for downloads that didnt download???

    Three different movies were charged to my account.....but not one of them finished downloading and I couldnt watch them in full....I would just start getting into the movie (which all three were documentaries about the government and their lies) and

  • SAP Memory Analyzer

    Hi experts. I've here the Enterprise Portal installed in HP-UX and I'd like to use the SAP Memory Analyzer see some problems. I can use it? How I configure it in my desktop? Thanks for your help.

  • In SAP 4.6 - Purchase order delivery address - Change

    Hi All I have created a PO and in print preview i can see the delivery address as plant address, which is also in PO item details. Now the EKPO-Address number does not have any value. Once I have changed the delivery address in item details, the deli

  • Theme/display changed

    I got my BB curve back in December from Orange and loved it.  To cut a long story short there was technical problem which meant Orange replaced it.  However the new replacement has a slighlty different theme than the previous one. It seems to have so

  • Skype to go with PayAsYouGo

    Hello,Is it possible to have a skype to go number with a PayAsYouGo account, I mean by using the Skype account without any subsription.Eventually which is the fee?