!!!Please Any Help greatly Appreciated !!!!!*Cries*!!!!!!!*sobs*

import java.io.*;
// File:
// Author:
public class Assignment
     public static void main (String args [] ) throws Exception
char answer = 0;
boolean run = true;
while(run) {
     InputStreamReader ins = new InputStreamReader (System.in);
     BufferedReader RodneysBuff = new BufferedReader (ins);
     System.out.println( "Add new pet.......................................A");
     System.out.println( "First.............................................F");
     System.out.println( "Previous..........................................P");
     System.out.println( "Next..............................................N");
     System.out.println( "Last..............................................L");
     System.out.println( "Quit..............................................Q");
System.out.println( "Enter Choice: ");     
     String input=RodneysBuff.readLine();
     answer = input.charAt(0);
     switch (answer) {            
          case 'a':
          System.out.println( "Ok add new pet");
          break;
          case 'f':
          System.out.println( "Ok im showing you the first pet in your collection");
          break;
          case 'p':
          System.out.println( "Ok im showing you the previouse pet");
          break;
          case 'n':
          System.out.println( "Ok im showing you the next pet ");
          break;
          case 'l':
          System.out.println( "Ok im showing you the last pet ");
          break;
          case 'q':
          System.out.println( "Exit the program ");
               run = false;
          break;
          default:
          System.out.println( "Invalid data" );
System.out.println();
I am Really Stuck on these Things ...i have done a heaps !!! ..my Brain is FRied atm!!! and if anyone could tell me how to do these i Would be Greatly appreciative to them... or could tell me where to go to get some help on these things ....I AM JUST SO CONFUSED :S:S:S:S:S:S:S:S:S:S:S: sobs
Add a loop to display 20 blank lines (effectively clearing the screen).
After the switch statement, prompt the user to press the ENTER key and then read a line from the keyboard. This stops the code from looping to the next menu display, so the user can read the response to their choice.

Now let's improve your code :
import java.io.*;
// File:
// Author:
public class Assignment
public static void main (String args [] ) throws Exception
char answer = 0;
boolean run = true;
while(run) {
InputStreamReader ins = new InputStreamReader (System.in);
BufferedReader RodneysBuff = new BufferedReader (ins);
System.out.println( "Add new pet.......................................A");
System.out.println( "First.............................................F");
System.out.println( "Previous..........................................P");
System.out.println( "Next..............................................N");
System.out.println( "Last..............................................L");
System.out.println( "Quit..............................................Q");
System.out.println( "Enter Choice: ");
String input=RodneysBuff.readLine();
answer = input.toLowerCase().charAt(0); // to make no difference between A or a
switch (answer) {
case 'a':
System.out.println( "Ok add new pet");
break;
case 'f':
System.out.println( "Ok im showing you the first pet in your collection");
break;
case 'p':
System.out.println( "Ok im showing you the previouse pet");
break;
case 'n':
System.out.println( "Ok im showing you the next pet ");
break;
case 'l':
System.out.println( "Ok im showing you the last pet ");
break;
case 'q':
System.out.println( "Exit the program ");
run = false;
break;
default:
System.out.println( "Invalid data" );
System.out.println("Type enter to continue);
input=RodneysBuff.readLine();
}

Similar Messages

  • I'm trying to transfer data (docs, emails) from G4 iMac running os 10.3.9 to brand new iMac on 10.8.1  I'm stuck, any help greatly appreciated.  (Ethernet or wifi networking are both options if I can figure out how to get the machines to communicate.)

    I'm trying to transfer data (docs, emails) from an old G4 iMac running OS 10.3.9 to brand new iMac on 10.8.1  I'm stuck, any help greatly appreciated.  (Ethernet or wifi networking are both options if I can figure out how to get the machines to communicate.)

    AMoriyama wrote:
    I have the old machine backed up onto an external firewire disk but can't hook that up to the new imac as I'm waiting for delivery of a firewire 400/800 adaptor - therefore starting the old machine up as a slave is also subject to the same delay.
    I was hoping there might be some way to create a network between the 2 machines (and 2 different versions of the OS) to be able to transfer data across immediately but perhaps I'll just have to wait for my firewire adaptor to arrive.
    I don't understand why you're buying a Firewire adaptor, since AFAIK both of your computers have Firewire already built in.
    All you need is a firewire cable. Connect the Firewire socket on the old machine to the Firewire socket on your new iMac.
    Then start the old machine in Target Mode (i.e. by holding down the T key on its keyboard, while it's starting up, until you see the three-legged T icon hopping around the screen of the old machine.)
    At that point you will also see a new icon on the screen of your new iMac. This is the hard drive of your old machine.  By clicking on it you can navigate through it any way you like, just as you would normally.
    Just drag across whatever you want from the old computer to the new one. This will leave everything on the old computer untouched.
    - or use Migration Assistant but in my experience, Migration Assistant isn't very reliable and fails to migrate large amounts of stuff.

  • Just got photoshop CC but can't get 3D to work. Any help greatly appreciated.

    Just got photoshop CC but can't get 3D to work. Any help greatly appreciated.

    Do you have a video card with at least 512 MB of vRAM?
    I only have 256 MB vRAM on my older iMac and still have 3D capability in PS CS5, but not in PS CC. The newer versions of PS require 512 MB in order to enable 3D.

  • Setting up new iphone from a back up and it's trying to sync all apps, this is going over memory capacity.  it's also not bring over any of the music that i had on my old phone, any help greatly appreciated. thanks

    hi,
    i'm setting up new iphone from a back up and it's trying to sync all apps, this is going over memory capacity.  it's also not bring over any of the music that i had on my old phone, any help greatly appreciated. thanks

    Geesh - all this information and no  one has any clue to this? Not even someone from Apple?
    Can someone at least point me in the right direction?

  • Hi, back ups to my TC suddenly won't work saying there's a problem with network username/password.  Any help greatly appreciated!

    I've deselected the disc, reselected it & re-entered the password 3 times now with no luck.
    Any help greatly appreciated!

    It sounds like you have much more issues than simply the TC..
    I can suggest or have suggested the workaround to the TC problem.
    Did you try it??
    What happened if you did?
    Did you simply try the standard old reboot the TC.. ie yank out the power cord. count to 10.. plug in the power cord.
    That magically fixes lots of network issues.
    Mavericks has some major issues.. do you upgrade install.
    Let me strongly recommend a clean install.. if you haven't done it. Your issues with safari look like a corrupted install to me.. but I am not an eggs spurt in OS issues.. by any long stretch of the imagination.. post the issue over in the Mavericks area.
    But as an old computer support man.. (old should be emphasised) upgrade installation are anethma.. I have never seen them work 100% and that includes with Mac. Of course you cannot expect windows to work.. but things go wrong in every OS.. no matter how wonderful.
    Make sure you have a good TM backup .. clean install and migrate your documents back.. maybe reinstall software from scratch. Not easy but the only way.

  • Why has my ipad mini stopped connecting with my iPhone 4S? I used to use it to download books, or transfer emails to my ipad mini. It was fine 3 days ago, now I get a message saying " cannot join with iPhone" Any help greatly appreciated.

    Why has my ipad mini stopped connecting with my iPhone 4S? I used to use it to download books, or transfer emails to my ipad mini. It was fine 3 days ago, now I get a message saying " cannot join with iPhone" Any help greatly appreciated.

    You can try resetting your iPad and iPhone by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears.
    Try again to see if the problem persists.

  • I updated my 3gs and it wiped all my apps, now when trying to rebuy the apps it is asking for a postcode(i live in ireland where there are none)and it also will not accept my payment card type.any help greatly appreciated

    I updated my 3gs and it wiped all my apps, now when trying to rebuy the apps it is asking for a postcode(i live in ireland where there are none)and it also will not accept my payment card type.any help greatly appreciated

    I cannot find this 300GB "Backup" in the Finder, only in the Storage info when I check "About This Mac".
    You are probably using Time Machine to backup your MacBook Pro, right? Then the additional 300 GB could be local Time Machine snapshots.  Time Machine will write the hourly backups to the free space on your hard disk, if the backup drive is temporarily not connected. You do not see these local backups in the Finder, and MacOS will delete them, when you make a regular backup to Time Machine, or when you need the space for other data.
    See Pondini's page for more explanation:   What are Local Snapshots?   http://pondini.org/TM/FAQ.html
    I have restarted my computer, but the information remains the same. How do I reclaim the use of the 300GB? Why is it showing up as "Backups" when it used to indicate "Photos"? Are my photos safe on the external drive?
    You have tested the library on the external drive, and so your photos are save there.  
    The local TimeMachine snapshot probably now contains a backup of the moved library.  Try, if connecting your Time Machine drive will reduce the size of your local Time Machine snapshots.

  • Hi, my Macbook says its connected to the internet, but it's not working.  It's about 2 years old and has been fine up until now.  Its the same internet provider and I have a work PC laptop that is connecting fine.  Any help greatly appreciated.  Liz

    Hi,
    My MacBook Pro won't connect to the internet, although it says it is connected.  The laptop is about 2 years old and up until now has worked fine.  My work PC laptop is connecting to the internet fine so I know it can't be the connection.   I've checked for Adware/Malware (just in case) via safemac and that all seems fine.
    I'm running OSX 10.8.5.
    Any advice would be greatly appreciated.
    Many thanks
    Liz

    Believe it or not, that article helped me find a temporary solution. After reading it I realized that the problem did have to do with my DNS settings. I had taken the DNS settings that my ISP gives me when I dial up and plugged them into the configuration for my AirPort card. This apparently caused a problem because, although my wireless network is always on, it's not always connected to the internet. So those DNS settings were invalid most of the time.
    I found that as long as I leave the area for DNS servers blank, the computer logs in normally. This further confirms my suspicion that something was trying to access the internet at login. I guess as long as I don't specify any DNS servers, the computer realizes it doesn't have an internet connection through my AirPort card.
    So I just created two network locations: one for when my network is connected to the internet and one for when it isn't. In the first, I kept my original DNS settings because they work as long as I have an internet connection. In the second I did not specify any DNS servers. This seems to work fine, but I'd still like to know what is trying to access the internet at login. I've disabled the automatic update feature in all my programs that have it, but that doesn't seem to help the slowdown at login. Does anyone know how I could figure out what program is trying to access the internet?

  • Recent update caused this error - any help greatly appreciated

    After running the following updates:
    2010-07-08 00:43:03 -0400: Installed "Security Update 2010-004" (1.0)
    2010-07-08 00:43:35 -0400: Installed "iTunes" (9.2)
    2010-07-08 00:43:37 -0400: Installed "Xserve LOM Firmware Update" (1.2)
    2010-07-08 00:44:04 -0400: Installed "Safari" (5.0)
    OS X 10.5 server is now having the following system log message.
    Jul 9 12:36:20 server named[27069]: starting BIND 9.4.3-P3 -f
    Jul 9 12:36:20 server named[27069]: /etc/dns/publicView.conf.apple:1: invalid prefix length '255'
    Jul 9 12:36:20 server named[27069]: loading configuration: out of range
    Jul 9 12:36:20 server named[27069]: exiting (due to fatal error)
    I have searched hi and low on forms and the web for a possible answer to this.
    Major issue is that some DNS requests are timing out for no apperent reason.
    Any help would be appreciated.

    Hi foilpan,
    Thanks for the quick post.
    I don't see any syntax errors.
    Here is the file.
    acl "com.apple.ServerAdmin.DNS.public" {localnets;10.200.131.0/255;};
    // This is the view that is shown in Server Admin
    // This is an automatically generated file.
    // PLEASE DO NOT MANUALLY MODIFY THIS FILE!
    // Please make your changes in the named.conf file
    view "com.apple.ServerAdmin.DNS.public" {
    //GUID=5846CA82-ACBA-4F25-BD4C-5725620D66F6;
    allow-recursion {"com.apple.ServerAdmin.DNS.public";};
    zone "hainer.ca." {
    type master;
    file "db.hainer.ca.";
    allow-transfer {any;};
    allow-update {none;};
    zone "28.70.76.in-addr.arpa." {
    type master;
    file "db.28.70.76.in-addr.arpa.";
    allow-transfer {none;};
    allow-update {none;};
    zone "insurancemd.ca." {
    type master;
    file "db.insurancemd.ca.";
    allow-transfer {any;};
    allow-update {none;};
    zone "50something.ca." {
    type master;
    file "db.50something.ca.";
    allow-transfer {any;};
    allow-update {none;};
    zone "insuranceland.ca." {
    type master;
    file "db.insuranceland.ca.";
    allow-transfer {any;};
    allow-update {none;};
    zone "." {
    type hint;
    file "named.ca";
    zone "localhost" IN {
    type master;
    file "localhost.zone";
    allow-update { none; };
    zone "0.0.127.in-addr.arpa" IN {
    type master;
    file "named.local";
    allow-update { none; };
    Thanks for your quick response.

  • HT201412 Have a problem with iPad2, apple logo appears but iPad won't boot up, then logo disappears & iPad dies - probably caused due to insufficient hard disk space (too many apps) - any help greatly appreciated

    I have a problem with iPad2, apple logo appears but iPad won't boot up, then logo disappears & iPad dies - probably caused due to insufficient hard disk space (foolishly loaded up too many apps) - any help/advice greatly appreciated

    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    Update and restore alert messages on iPhone, iPad, and iPod touch
    http://www.buybuyla.com/tech/view/012953a0d412000e.shtml
    iOS: Resolving update and restore alert messages
    http://support.apple.com/kb/TS1275
    iPad: Unable to update or restore
    http://support.apple.com/kb/ht4097
     Cheers, Tom

  • Two eMacs with two different problems..Any help greatly appreciated.

    Hi i am new to the mac world and have recently aquired two eMacs, one with a minor problem - no sound from speakers other than at start up and no sound even through headphone jack, the other has a slightly more complicated problem, when you first turn it on it will not boot at all goes to a grey screen and there it sits, so i force quit and re-boot this time i get an apple and apples progress bar i call it looks like vertical lines in a circle and then there it sits, on the third time it finally boots in to OS X 10.3.2 i believe is the OS and i was told when i recieved this one that it will crash after sometime of stayin on. So any help or if this issue has been addressed please point me in the right direction.
    Thanks

    Hi jahnel,
    First machine - not much clue I'm afraid... Am assuming you know to turn the sound up What I'd suggest is doing what I'm about to suggest for the second machine...
    Second machine - Do you have the original eMac startup CD/DVDs? On them there is a program called Hardware Test, that performs a check of the computer's hardware. If you can run it, it can at least hopefully rule out any hardware issues that may be causing your problems.
    Next idea, is to boot from the/a system instal disc, and perform a fresh instal of the Mac OS. Further, I'd first suggest re-initialising the hard drive, to give you a clean slate.
    If the computer will not boot from the instal CD/DVD, what you can do is start the eMac in Firewire mode (Hold down the Command and "T" keys during startup), and connect the computer via firewire to another Mac. It will mount the eMac's hard drive onto the other computer, so that you can then use the other computer's optical drive to perform a System instal (In this case, you could actually use the "First machine" to perform the instal on the "Second Machine").

  • Ipod Nano Problem sync/playing - Any help greatly appreciated

    I've looked through the forum for others with problems but none seem to match mine. I am here on behalf of my girlfriend who has had a nano for christmas and up to now been using it fine, but this morning she tried connecting it to the computer and when she plugged the cable in it gave the "synchronising" message with the rotating arrows but then after a few seconds just gives the "safe to disconnect" message and goes back to the main screen, without even appearing on itunes. on top of that, the ipod will not play any songs, when you push play the icon changes in the corner to say its playing but the time bar stays in the same position and no music can be heard.
    I have tried resetting the ipod, going into disk mode, using diagnostics mode. restarting the computer, using another usb port, reinstalling itunes. nothing is shifting it. cant format it or restore as it doesnt get to connect to itunes in the first place. any help would be amazing as i dont want to have to send it back to apple. thankyou.

    I've looked through the forum for others with problems but none seem to match mine. I am here on behalf of my girlfriend who has had a nano for christmas and up to now been using it fine, but this morning she tried connecting it to the computer and when she plugged the cable in it gave the "synchronising" message with the rotating arrows but then after a few seconds just gives the "safe to disconnect" message and goes back to the main screen, without even appearing on itunes. on top of that, the ipod will not play any songs, when you push play the icon changes in the corner to say its playing but the time bar stays in the same position and no music can be heard.
    I have tried resetting the ipod, going into disk mode, using diagnostics mode. restarting the computer, using another usb port, reinstalling itunes. nothing is shifting it. cant format it or restore as it doesnt get to connect to itunes in the first place. any help would be amazing as i dont want to have to send it back to apple. thankyou.

  • Problem with iphone songs, any help greatly appreciated...

    Well I've been having this problem with all my songs in the ipod section of my iphone for a few weeks now, ever since I bought the new iphone. There's a very subtle popping or crackle noise in between almost every song when I change or skip through tracks and I can't seem to fix this problem.. or maybe it's a problem all iphones share? I bought my first iphone, it seemed to have that problem, then I exchanged it for my second iphone which I received last night... and it still has the problem! I've seen similar problems on other mp3 players like the ipod shuffle.. I'm not very good at explaining the problem I'm encountering so please take a look at this other forum, the problem discussed in it is the same problem I have, only with iphone instead of ipod shuffle:
    http://forums.ilounge.com/archive/index.php/t-71272.html
    please, if anyone will be so kind to take a look and give some insight to my issue I would GREATLY appreciate it. Thank you for taking the time to read this. (you don't have to read the entire thread on that link I've provided, of course, but please skim it, you'll understand what the problem is that they and I'm talking about..)

    Well I've been having this problem with all my songs in the ipod section of my iphone for a few weeks now, ever since I bought the new iphone. There's a very subtle popping or crackle noise in between almost every song when I change or skip through tracks and I can't seem to fix this problem.. or maybe it's a problem all iphones share? I bought my first iphone, it seemed to have that problem, then I exchanged it for my second iphone which I received last night... and it still has the problem! I've seen similar problems on other mp3 players like the ipod shuffle.. I'm not very good at explaining the problem I'm encountering so please take a look at this other forum, the problem discussed in it is the same problem I have, only with iphone instead of ipod shuffle:
    http://forums.ilounge.com/archive/index.php/t-71272.html
    please, if anyone will be so kind to take a look and give some insight to my issue I would GREATLY appreciate it. Thank you for taking the time to read this. (you don't have to read the entire thread on that link I've provided, of course, but please skim it, you'll understand what the problem is that they and I'm talking about..)

  • Hi, I just updated to ff6, when i open a new browser the tab bar is missing....however when i hit Ctrl+T i get the tab bar back with the original tab and the new tab. I have box checked in options "always show the tab bar". Any help greatly appreciated

    Using Windows XP and Firefox 6....tab bar has gone missing but returns when i open a second tab. I used to be able to open a browser which opened my bookmarked homepage and I cold then click the + to the right of this tab and open a new tab.

    hello, please install the search reset addon - it will revert the most common customizations those adware programs do in firefox back to the default: https://addons.mozilla.org/firefox/addon/searchreset/

  • Ever since I upgraded to iOS 5 (and now iOS 5.0.1) I have been unable to synch my purchased ring tones to my iPhone 4. Any help greatly appreciated.

    I would like to be able to synch my purchased ringtones to my iPhone 4 like I was able to before upgrading to iOS 5 and iOS 5.0.1. The ringtones are definitely in my iTunes folder and selected for synch. Ironically the 1 ringtone I made for myself synch fine. What's up with this?

    Has the problem been solved?   This just happened to me.  I'm so upset.  It took me months to create 107 customer ringtones.  The ringtones on iTunes are lame and no creativitiy.  First 30 seconds and that's their idea of a ringtone.   My tones have character.    So I need to know how to restore my ringtones.    Do you have an answer???      Help!

Maybe you are looking for

  • Invoice is not getting posted to accounts it is showing the export error

    invoice is not getting posted to accounts, it is showing an error of foreign trade / export data. where as it is with in the country. it is maintained for the plants abroad stock transport order.

  • TS3623 Apple TV movie streaming problem

    Hi Folks When playing movies from my computer to Television via apple tv they play for 2-4 minutes the disappear leaving me to have to switch itunes off then back on again but after another 2-4 minutes the same thing happens. Any Ideas?? I've reboote

  • How to integrating APEX with the Oracle eBusiness suite release 11i

    I need to integrate Apex with Oracle eBusiness Suite Release11. APEX need to use ERP authentication (user name/password) and oracle APEX pages will be called from oracle eBusiness Relese 11i menu. I have followed metalink doc. 373604.1 and also looke

  • Here's one for ya! Extreme and Express together...

    Hi, I purchased an Extreme and Express today. (So far this is working much better than the D-Link and Linksys I tested.) Ok, here's what I'd like to do. Firstly, the DSL modem is connected to the Extreme. 1) I have a Mac Pro 2.66 which is connected t

  • How to turn off apps running in the background on the iPad mini

    I am a long time iPhone and Mac user. We just purchesed a new iPad mini. I can't seem to get the apps running in the background to turn off. They won't wiggle, neither will they let me swipe up to remove them. Is there a preference in settings I need