Sorry anyone check for me??? problem....or any advanced features

import java.util.Scanner;
public class JPetWorld
     public static void main(String[] args)
Scanner sc = new Scanner(System.in);
          System.out.print("Enter Name of Pet : ");
          String name = sc.nextLine();
System.out.print("Enter Gender of Pet (M/F): ");
char gender = sc.nextLine().charAt(0);
          Pet p = new Pet(name, gender);
//foodQuanity
int foodQuantity = 0;
//pet Accomodation
System.out.print("Enter Accomodation of Pet (sofa or basket) : ");
String accom = sc.nextLine();
p.buyAccomodation(accom);
//Buy Pet Food
System.out.print("Enter quantity of pet food to buy : ");
int num = sc.nextInt();
sc.nextLine();
foodQuantity = p.buyFood(num);
for (int i =0; i<10; i++)
//Menu
System.out.println("Menu");
System.out.println("1. Check pet food quantity");
System.out.println("2. Feed Pet");
System.out.println("3. Play with Pet");
System.out.println("4. Bath pet");
System.out.println("5. Advance to next day");
System.out.println("6. Bid farewell and Exit");
System.out.println("\nEnter choice: ");
int choice = sc.nextInt();
sc.nextLine();
switch (choice)
case 1: System.out.println("Food Quantity = " + foodQuantity);
break;
case 2: if (foodQuantity >=0)
System.out.println("Pet is eating food...slurp,slurp");
p.feed();
foodQuantity --;
else
System.out.println("Not enough food to feed pet!");
break;
// 2nd menu
case 3: System.out.println("Menu");
System.out.println("1. Play Fetch");
System.out.println("2. Play hide and seek");
System.out.println("\nEnter choice: ");
int play = sc.nextInt();
if (play==1)
p.playFetch();
else if (play==2)
p.playHideAndSeek();
else
System.out.println("Invalid Choice: ");
break;

sorry arbie do u need to look at my question so that
u can help me further?????i think i see the question here
http://forum.java.sun.com/thread.jspa?threadID=655114&messageID=3850935#3850935unfortunately i have to go but i hope my earlier post helped.
you can specify constants to define types of food.
you can pattern it after what the java core classes do.
for example java.util.Calendar
does my previous post make sense?
i'll try to get back with you later.
A

Similar Messages

  • Just bought the ipad4 and can't log into facebook. Times out and tells me to check my network connection. Anyone having the same problem or any ideas?

    Just bought the ipad4 and can't log into facebook. Times out and tells me to check my network connection. Anyone having the same problem or any ideas?

    Hey barnsieno10,
    Thanks for using Apple Support Communities.
    Looks like sign in issue, This article is a great resource for the message you are receiving.
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/ts3970
    Have a nice day,
    Mario

  • My Iphone and Ipad will not pick up my new email messages..for the last few days...I have tried deleteling the account and reseting it and it still only picks up the old messages? Anyone else having tis problem? ANy ideas how to fix it?

    My Iphone and Ipad will not pick up my new email messages..for the last few days...I have tried deleteling the account (a number of times..)  and setting the account back up?  and it still only picks up the old messages? Anyone else having tis problem? Any ideas how to fix it?
    This just started happening for no reason...no changes to the phone or Ipad?

    my iphone and ipad will not send or receive emails or messages for the last few days.  it is telling me that cannot connect to server

  • I have a problem with my ipad when choosing software update it is continously loading the message checking for updates without showing any results

    I have a problem with my ipad when choosing software update it is continously loading the message checking for updates without showing any results  

    Hello SuzMiller
    Check out the article for the troubleshooting steps for issues with email on your iPhone and iPad.
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • I am looking for a (free, ideally) virus scan/check for my MacBook Pro -- any suggestions?

    I am looking for a (free, ideally) virus scan/check for my MacBook Pro -- any suggestions?

    Mac users often ask whether they should install "anti-virus" software. The answer usually given on ASC is "no." The answer is right, but it may give the wrong impression that there is no threat from what are loosely called "viruses." There  is a threat, and you need to educate yourself about it.
    1. This is a comment on what you should—and should not—do to protect yourself from malicious software ("malware") that circulates on the Internet and gets onto a computer as an unintended consequence of the user's actions. It does not apply to software, such as keystroke loggers, that may be installed deliberately by an intruder who has hands-on access to the computer, or who has been able to log in to it remotely. That threat is in a different category, and there's no easy way to defend against it.
    The comment is long because the issue is complex. The key points are in sections 5, 6, and 10.
    OS X now implements three layers of built-in protection specifically against malware, not counting runtime protections such as execute disable, sandboxing, system library randomization, and address space layout randomization that may also guard against other kinds of exploits.
    2. All versions of OS X since 10.6.7 have been able to detect known Mac malware in downloaded files, and to block insecure web plugins. This feature is transparent to the user. Internally Apple calls it "XProtect."
    The malware recognition database used by XProtect is automatically updated; however, you shouldn't rely on it, because the attackers are always at least a day ahead of the defenders.
    The following caveats apply to XProtect:
    ☞ It can be bypassed by some third-party networking software, such as BitTorrent clients and Java applets.
    ☞ It only applies to software downloaded from the network. Software installed from a CD or other media is not checked.
    As new versions of OS X are released, it's not clear whether Apple will indefinitely continue to maintain the XProtect database of older versions such as 10.6. The security of obsolete system versions may eventually be degraded. Security updates to the code of obsolete systems will stop being released at some point, and that may leave them open to other kinds of attack besides malware.
    3. Starting with OS X 10.7.5, there has been a second layer of built-in malware protection, designated "Gatekeeper" by Apple. By default, applications and Installer packages downloaded from the network will only run if they're digitally signed by a developer with a certificate issued by Apple. Software certified in this way hasn't necessarily been tested by Apple, but you can be reasonably sure that it hasn't been modified by anyone other than the developer. His identity is known to Apple, so he could be held legally responsible if he distributed malware. That may not mean much if the developer lives in a country with a weak legal system (see below.)
    Gatekeeper doesn't depend on a database of known malware. It has, however, the same limitations as XProtect, and in addition the following:
    ☞ It can easily be disabled or overridden by the user.
    ☞ A malware attacker could get control of a code-signing certificate under false pretenses, or could simply ignore the consequences of distributing codesigned malware.
    ☞ An App Store developer could find a way to bypass Apple's oversight, or the oversight could fail due to human error.
    Apple has so far failed to revoke the codesigning certificates of some known abusers, thereby diluting the value of Gatekeeper and the Developer ID program. These failures don't involve App Store products, however.
    For the reasons given, App Store products, and—to a lesser extent—other applications recognized by Gatekeeper as signed, are safer than others, but they can't be considered absolutely safe. "Sandboxed" applications may prompt for access to private data, such as your contacts, or for access to the network. Think before granting that access. Sandbox security is based on user input. Never click through any request for authorization without thinking.
    4. Starting with OS X 10.8.3, a third layer of protection has been added: a "Malware Removal Tool" (MRT). MRT runs automatically in the background when you update the OS. It checks for, and removes, malware that may have evaded the other protections via a Java exploit (see below.) MRT also runs when you install or update the Apple-supplied Java runtime (but not the Oracle runtime.) Like XProtect, MRT is effective against known threats, but not against unknown ones. It notifies you if it finds malware, but otherwise there's no user interface to MRT.
    5. The built-in security features of OS X reduce the risk of malware attack, but they are not, and never will be, complete protection. Malware is a problem of human behavior, and a technological fix is not going to solve it. Trusting software to protect you will only make you more vulnerable.
    The best defense is always going to be your own intelligence. With the possible exception of Java exploits, all known malware circulating on the Internet that affects a fully-updated installation of OS X 10.6 or later takes the form of so-called "Trojan horses," which can only have an effect if the victim is duped into running them. The threat therefore amounts to a battle of wits between you and the scam artists. If you're smarter than they think you are, you'll win. That means, in practice, that you always stay within a safe harbor of computing practices. How do you know when you're leaving the safe harbor? Below are some warning signs of danger.
    Software from an untrustworthy source
    ☞ Software of any kind is distributed via BitTorrent, or Usenet, or on a website that also distributes pirated music or movies.
    ☞ Software with a corporate brand, such as Adobe Flash Player, doesn't come directly from the developer’s website. Do not trust an alert from any website to update Flash, or your browser, or any other software.
    ☞ Rogue websites such as Softonic and CNET Download distribute free applications that have been packaged in a superfluous "installer."
    ☞ The software is advertised by means of spam or intrusive web ads. Any ad, on any site, that includes a direct link to a download should be ignored.
    Software that is plainly illegal or does something illegal
    ☞ High-priced commercial software such as Photoshop is "cracked" or "free."
    ☞ An application helps you to infringe copyright, for instance by circumventing the copy protection on commercial software, or saving streamed media for reuse without permission.
    Conditional or unsolicited offers from strangers
    ☞ A telephone caller or a web page tells you that you have a “virus” and offers to help you remove it. (Some reputable websites did legitimately warn visitors who were infected with the "DNSChanger" malware. That exception to this rule no longer applies.)
    ☞ A web site offers free content such as video or music, but to use it you must install a “codec,” “plug-in,” "player," "downloader," "extractor," or “certificate” that comes from that same site, or an unknown one.
    ☞ You win a prize in a contest you never entered.
    ☞ Someone on a message board such as this one is eager to help you, but only if you download an application of his choosing.
    ☞ A "FREE WI-FI !!!" network advertises itself in a public place such as an airport, but is not provided by the management.
    ☞ Anything online that you would expect to pay for is "free."
    Unexpected events
    ☞ A file is downloaded automatically when you visit a web page, with no other action on your part. Delete any such file without opening it.
    ☞ You open what you think is a document and get an alert that it's "an application downloaded from the Internet." Click Cancel and delete the file. Even if you don't get the alert, you should still delete any file that isn't what you expected it to be.
    ☞ An application does something you don't expect, such as asking for permission to access your contacts, your location, or the Internet for no obvious reason.
    ☞ Software is attached to email that you didn't request, even if it comes (or seems to come) from someone you trust.
    I don't say that leaving the safe harbor just once will necessarily result in disaster, but making a habit of it will weaken your defenses against malware attack. Any of the above scenarios should, at the very least, make you uncomfortable.
    6. Java on the Web (not to be confused with JavaScript, to which it's not related, despite the similarity of the names) is a weak point in the security of any system. Java is, among other things, a platform for running complex applications in a web page, on the client. That was always a bad idea, and Java's developers have proven themselves incapable of implementing it without also creating a portal for malware to enter. Past Java exploits are the closest thing there has ever been to a Windows-style virus affecting OS X. Merely loading a page with malicious Java content could be harmful.
    Fortunately, client-side Java on the Web is obsolete and mostly extinct. Only a few outmoded sites still use it. Try to hasten the process of extinction by avoiding those sites, if you have a choice. Forget about playing games or other non-essential uses of Java.
    Java is not included in OS X 10.7 and later. Discrete Java installers are distributed by Apple and by Oracle (the developer of Java.) Don't use either one unless you need it. Most people don't. If Java is installed, disable it—not JavaScript—in your browsers.
    Regardless of version, experience has shown that Java on the Web can't be trusted. If you must use a Java applet for a task on a specific site, enable Java only for that site in Safari. Never enable Java for a public website that carries third-party advertising. Use it only on well-known, login-protected, secure websites without ads. In Safari 6 or later, you'll see a lock icon in the address bar with the abbreviation "https" when visiting a secure site.
    Stay within the safe harbor, and you’ll be as safe from malware as you can practically be. The rest of this comment concerns what you should not do to protect yourself.
    7. Never install any commercial "anti-virus" (AV) or "Internet security" products for the Mac, as they are all worse than useless. If you need to be able to detect Windows malware in your files, use one of the free security apps in the Mac App Store—nothing else.
    Why shouldn't you use commercial AV products?
    ☞ To recognize malware, the software depends on a database of known threats, which is always at least a day out of date. This technique is a proven failure, as a major AV software vendor has admitted. Most attacks are "zero-day"—that is, previously unknown. Recognition-based AV does not defend against such attacks, and the enterprise IT industry is coming to the realization that traditional AV software is worthless.
    ☞ Its design is predicated on the nonexistent threat that malware may be injected at any time, anywhere in the file system. Malware is downloaded from the network; it doesn't materialize from nowhere. In order to meet that nonexistent threat, commercial AV software modifies or duplicates low-level functions of the operating system, which is a waste of resources and a common cause of instability, bugs, and poor performance.
    ☞ By modifying the operating system, the software may also create weaknesses that could be exploited by malware attackers.
    ☞ Most importantly, a false sense of security is dangerous.
    8. An AV product from the App Store, such as "ClamXav," has the same drawback as the commercial suites of being always out of date, but it does not inject low-level code into the operating system. That doesn't mean it's entirely harmless. It may report email messages that have "phishing" links in the body, or Windows malware in attachments, as infected files, and offer to delete or move them. Doing so will corrupt the Mail database. The messages should be deleted from within the Mail application.
    An AV app is not needed, and cannot be relied upon, for protection against OS X malware. It's useful, if at all, only for detecting Windows malware, and even for that use it's not really effective, because new Windows malware is emerging much faster than OS X malware.
    Windows malware can't harm you directly (unless, of course, you use Windows.) Just don't pass it on to anyone else. A malicious attachment in email is usually easy to recognize by the name alone. An actual example:
    London Terror Moovie.avi [124 spaces] Checked By Norton Antivirus.exe
    You don't need software to tell you that's a Windows trojan. Software may be able to tell you which trojan it is, but who cares? In practice, there's no reason to use recognition software unless an organizational policy requires it. Windows malware is so widespread that you should assume it's in everyemail attachment until proven otherwise. Nevertheless, ClamXav or a similar product from the App Store may serve a purpose if it satisfies an ill-informed network administrator who says you must run some kind of AV application. It's free and it won't handicap the system.
    The ClamXav developer won't try to "upsell" you to a paid version of the product. Other developers may do that. Don't be upsold. For one thing, you should not pay to protect Windows users from the consequences of their choice of computing platform. For another, a paid upgrade from a free app will probably have all the disadvantages mentioned in section 7.
    9. It seems to be a common belief that the built-in Application Firewall acts as a barrier to infection, or prevents malware from functioning. It does neither. It blocks inbound connections to certain network services you're running, such as file sharing. It's disabled by default and you should leave it that way if you're behind a router on a private home or office network. Activate it only when you're on an untrusted network, for instance a public Wi-Fi hotspot, where you don't want to provide services. Disable any services you don't use in the Sharing preference pane. All are disabled by default.
    10. As a Mac user, you don't have to live in fear that your computer may be infected every time you install software, read email, or visit a web page. But neither can you assume that you will always be safe from exploitation, no matter what you do. Navigating the Internet is like walking the streets of a big city. It's as safe or as dangerous as you choose to make it. The greatest harm done by security software is precisely its selling point: it makes people feel safe. They may then feel safe enough to take risks from which the software doesn't protect them. Nothing can lessen the need for safe computing practices.

  • Since downloading Mavericks last week my Mac is very slow.  Anyone else having this problem?  Any suggestion as to speeding things up?

    Since dowloading Mavericks last week my Mac is very slow.  Anyone else having this problem?  any suggestions as to what to do to speed things up?

    It will help people help you better if you post your iMac variant and Mac OSX version. Please do "About this Mac" from your Apple menu and, in the resulting window, click the "More Info" button. That will give this window:
    The model is in the line I've indicated with the red arrow. Please also post the results for "Memory" and "Processor."
    DO NOT post the serial number, however.

  • HT204266 My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

    My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

    My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

  • I can no longer shoot directly into phaseone software since i use my new macbook pro with retina display. pictures are not transfered from the camera into captureone. anyone else with this problem? any solutions?

    i can no longer shoot directly into phaseone software - neihter version 6 or 7 - since i use my new macbook pro with retina display. pictures are not transfered from the camera into captureone. anyone else with this problem? any solutions?

    My eyes just glazed over...Please in the future break down each of your issues with paragraphs separated by two carriage returns. It would be much easier when trying to address your issues.
    Go to Apple menu -> System Preferences -> Keyboard and Mouse -> Mouse
    And edit your mouse settings to do what you want it to do.
    Secondly, this is not the place to vent. If you have a complaint, there is:
    http://www.apple.com/feedback/
    or http://www.apple.com/contact/
    We are just end users here helping other end users.
    Third, from my understanding, it would appear you are concerned about the noise the hard drive makes when it falls asleep? Why not put your machine in screen saver mode instead? Apple menu -> System Preferences -> Energy Saver turn off all Energy Saver settings, or set them to run Never.
    Fourth, if your machine was purchased just a few days ago, you may still be able to get an exchange from the store, quicker than you can get a repair done. You may want to look into that possibility.
    Fifth, it does appear you found the Logic forum. I would persist in asking there how to solve your technical issue with Logic regarding the audio. It may be you don't have to do anything special to the hard drive. Remember audio can be transmitted by wire, avoiding ambient sounds.
    Good luck!

  • The calendar typeface is so dim, I can barely read it. Name of days and date, but not the items I put in. Apple says they have no fix. Anyone else have this problem? Any solutions?

    The calendar typeface is so dim, I can barely read it. Name of days and date, but not the items I put in. Apple says they have no fix. Anyone else have this problem? Any solutions?

    I agree and I found your post because I did a google search ical typeface dim.
    If I find anything out, I will post back here.

  • Since upgrading to ios7 my message screen is blank.I am neither able to seee,send or recieve messages. I upgraded my iPad at the same time but messaging works fine. Anyone else have this problem? Any suggestions?

    Since upgrading to ios7 my message screen is blank.I am neither able to seee,send or recieve messages. I upgraded my iPad at the same time but messaging works fine. Anyone else have this problem? Any suggestions?

    I have been researching the exchange message loss  problem on other forums, but not seen a link to browser as yet.  The message loss problem we have here is in a 32bit PB.

  • Is there any advanced feature of Adobe Flash released to lower the page loading slow down rate...?

    Any advanced feature of Adobe Flash to embed in my site
    Hi! My site is basically based on providing share market tips covering finance market. The site was recently migrated from the old look to a new look for a professional view. To make the home page wear a professional look, I am displaying a video like screen for news headlines organising images into jquery effect. But what I experienced so far this jquery effect is slowing down the home page at the time of loading (plz refer the screen shot below). You can check it  at Puntercalls Homepage .  I'm sure if I embed the normal flash feature in palce of this jquery, it must slow down than the former.
    So what I exactly want to know is if there is any advanced feature of Adobe Flash by which the homepage won't slow down while loading.
    Kind suggestions are greatly appreciated in advance!
    The screenshot of slower loading as the result of jquery effect:

    If you just want to change the way that the photo section works, then, it is most likely that a Flash version of the photo display might be smoother and faster to play than the jquery version that you are now using. Its difficult to guarantee a result. You have 10 css libraries and 8 js libraries that are called along with a good bit of inline js that is running on this site. So it will be difficult to say how quickly or smoothly a Flash .swf file will download and play.
    I'm guessing that Flash will be faster, but then I also think that going door to door and handing people a print of the photo would be faster than the jquery file that is running. You may want to look at the possible interference that you have on the current site between the various js and css files that are trying to display the content.

  • Unable to check for purchases problem . . .

    Hi,
    I mentioned this problem in another thread, but I think a new one is warranted.
    I too have received the "Unable to check for purchases" message after upgrading some songs using iTunes Plus. After allowing for the initial congestion to die down, it has now been over a month since I bought them, yet I still can't get the songs.
    But, my question is this. I emailed iTunes Customer Service, and I have received a reply requesting my billing details. I've checked, and this is information that Apple already holds. I'm a little suspicious about this request, here is the email:
    "I am sorry that you are not able to download your items that are currently in your download queue. To help troubleshoot this for you, I would like for you to reply to this email.
    In this email if you could please include the billing address associated with your account. I will also need your permission to test your account and reset your password.
    Once we have received this information, we will verify, reset your password and test your account. You will then receive a follow up email with you new password and the results of our test."
    Does this email sound realistic? Has anyone else received an email like this from iTunes Customer Service? I hope I can reset my password afterwards also.
    Yours (in paranoia)
    turkey101
    15" MacBook Pro, 2.4GHz Santa Rosa   Mac OS X (10.4.10)   12" Powerbook 1.5GHz G4 1.25GB, iMac 15 800MHz

    Yes, this email is realistic and not an uncommon reply (I also had such a reply when once I had a problem with the iTunes Store). The iTunes Store customer service rep sometimes needs to be able log into your account and check things when a problem arises, and it's something they can't do without resetting the password since they don't have access to your current password, they can only change it. So I don't think you need to worry.

  • ITunes refuses to check for App updates! Any idea why?

    I'm having what seems to be a strange problem. I have iTunes 11.0.1, with apps I have downloaded on my machine. Regardless of an iPad, iPod or iPhone attached, clicking on the "Check for Updates" button will NOT work. At all. I get app update alerts on my devices when they are not connected, but never on my Mac, running 10.6.8.
    Does anyone have an explanation for this?
    And before you give simpleton answers, I don't have "Pregnancy tracker" in my apps, the computer is authorized for my AppleID, and it is irrelevant whether an iDevice is connected. The iTunes app simply refuses to check when I click the button.

    The "check for update" button isn't for your apps.  It's for your iOS version.
    If you want to update apps, select the "apps" entry in your library, and you'll see the "# updates available" button, if you have updates.
    Top left:
    Bottom right:

  • Itunes stops working and sends me a message that windows is checking for the problem. I uninstalled and reinstalled itunes. It works for a while then problem resurfaces.

    I tunes stops working and I get a message stating that windows is checking for error. I uninstalled and reinstalled .. Any hints...

    See Troubleshooting issues with iTunes for Windows updates.
    If you haven't already done a complete uninstall of all iTunes components, folder wipe and reinstall please try that first. Otherwise please post back with the exact text of the error message next time it occurs.
    tt2

  • Checking for EXECUTE priviledges on any Procedure or Function

    Hi All,
    I know that the table DBA_SYS_PRIVS can be used to check the priviledges for any object.
    But after querying the view, I could see the priviledges on diff packages and other tables but could not find any Procedure or Function name ( Standalone or packaged) in the view.
    Where else could I find the same?
    Having execute priviledge on compelte package means having same on its contents( procs,functions etc)..is this right?
    Rgds,
    Aashish S.

    Aashish,
    You have object privileges (CREATE TABLE, ALTER TABLE and system privileges (ALTER SYSTEM, ALTER USER). They serve different purposed.
    DBA_SYS_PRIVS is for system privileges only.
    You can not have seen privileges on packages, at least not EXECUTE privileges.
    These are in DBA_TAB_PRIVS.
    Packages are granted at the package level.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • Error occurred while converting file on cd. Error (-50)

    Having issues downloading audio cds to itunes. Error (-50) message being received.

  • Has anyone else been mislead by Time Machine?

    Before I start, I'd like to make a little disclaimer that before the trolls set to work on berrating my naivity for the problem i've suffered, i'd just like to say "I KNOW THAT NOW" and hindsight is such a wonderful thing but unfortunately, the simpl

  • Shift wise confirmation report

    Hi Is there any report in SAP to see the shiftwise confirmation reports in Production. Actualy my management wants to see the work center wise list as well as confirmation is done or not of that stage. E.G. Pre turning material in this operation is  

  • Foreign Currency Revaluation concept

    HI experts, I am an MM Consultant, I would like to know the concept behind Foreign Currency Revaluation, I want to know the process in depth with concept wise and configuration wise. good reply will be rewarded. Thanks in advance.

  • Explain the logic in the code

    HI all, Can anyone explain the logic in the code ? This is to display the pages numbers in page 1 of 4                                                          page 2 of 4 format. i got this code in one of the forum. if the lineno is less then 64, th