User input in short notation and then full description of it ...

Hi,
well I have solve this problem:
Notation:

sorry something went wrong :)
Hi,
well I have solve this problem:
Notation: Meaning:
A Ace
2...10 Card values
J Jack
Q Queen
K King
D Diamonds
H Hearts
S Spades
C Clubs
The program shoul print the full description of the card, for example 4H -> Four of Heart
I tried this method to solve:
I Implemented a class Card with the constructor and a getDescription method (should return a description of the card)
if the the notation is not in the correct format the method should return "unknown" ...
here is what i tried can someone please help me I dont really know how the solve this:
public class Card {
      * Construct a Notation object
      * @param notation
     public Card (String notation)
          nota = notation ;
     public void getDescription ()
          if (nota == "A")
               System.out.println("Ace of ");
          String[] cv={"Ace","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Jack","Queen","King"};
           String[] cb={"A","2","3","4","5","6","7","8","9","10","J","Q","K"};
           String out="";
           for (int j=0;j<cv.length;j++) {
              if (nota.startsWith(cb[j])) {
                 out+=cv[j]+" of ";
                 break;
           if (nota.endsWith("D")) out+="Diamonds";
           else if (nota.endsWith("H")) out+="Hearts";
           else if (nota.endsWith("S")) out+="Spades";
           else out+="Clubs";
           System.out.println(out);
     }Then I want to use a CardTester Class to test the Class Card ...
public class CardTester {
     public static void main (String[] args)
          Card notation = new Card;
}

Similar Messages

  • HT201413 after downloading 2 albums ifind that most of the tunes only play for a short while and then switches to another tune does anyone know what the problem is and how to rectify it?

    Hello there ive just downloaded 2 albums from itunes store and found that they only play for a short while and then flips onto another tune which again only plays for short while so on and so forth which makes the albums completely useless does anyone have a solution?

    Assuming you are in a region where you are allowed to redownload your past purchases, delete the current copies from your iTunes library, go to the iTunes Store home page, click the Purchased link from the Quick Links section in the right-hand column, then select Music and Not on this computer. You should find download links for your tracks there.
    If the problem persists, or that facility is not yet available in your region, contact the iTunes Store support staff through the report a problem links in your account history, or via Contact Support.
    tt2

  • My iPhone 5 will not turn on. And when it does, it will only stay on for a short while and then it dies again.

    My iPhone 5 will not turn on. And when it does, it will only stay on for a short while and then it dies again.

    Hi lammyrock,
    I want to let you know to be patient as this troubleshooting can take some time depending on many different. First try putting your iPhone into recovery mode and then use iTunes to restore it. To do that, you can that by making sure that your iPhone is turned off, hold the Home button down while it is plugged into iTunes. You should get the graphic on your iPhone to plug it into iTunes and iTunes should prompt you to restore it. Once that is done and if you have a back up in iTunes or in iCloud, then you can put that back on after the restore is complete. Take a look at the article below for more information to help you. 
    If you can't update or restore your iPhone, iPad, or iPod touch
    http://support.apple.com/en-us/HT201263
    Hope this helps,
    -Norm G. 

  • When I use Iphone 4 personal hotspot on USB, it works for a short time and then times out.

    When I use Iphone 4 personal hotspot on USB, it works for a short time and then times out.
    When pinging my iphone directly at 172.20.10.1, while I'm surfing and it times out, the ping shows nothing but "request timed out" .. Sometimes it "comes back" and sometimes I have to reboot my phone or disconnect the USB.. It's always done this and only on USB, it's very frustrating.
    I have packet sniffed also, using Wireshark. When the "timeouts" happen, there's no more data coming from the Iphone. My PC continually sends ARP requests as well and don't get responses.
    Have searched google endlessly and have gotten no where. This has been going on for several months and I'm just getting a bit fed up now.
            Description . . . . . . . . . . . : Apple Mobile Device Ethernet #3
            Physical Address. . . . . . . . . : 42-A6-D9-94-82-9D
            Dhcp Enabled. . . . . . . . . . . : Yes
            Autoconfiguration Enabled . . . . : Yes
            IP Address. . . . . . . . . . . . : 172.20.10.2
            Subnet Mask . . . . . . . . . . . : 255.255.255.240
            Default Gateway . . . . . . . . . : 172.20.10.1
            DHCP Server . . . . . . . . . . . : 172.20.10.1
            DNS Servers . . . . . . . . . . . : 172.16.206.215
                                                172.16.206.215
            Lease Obtained. . . . . . . . . . : Saturday, August 20, 2011 7:38:28 PM
            Lease Expires . . . . . . . . . . : Sunday, August 21, 2011 7:24:04 PM

    I guess if it were me I'd try hotter/longer, then never allow it to Sleep except for the Monitor, & set Processor to Highest Energy Saver>Options tab.
    If you still want a G5, they've been getting cheaper on eBay & such, here's a 1.8 with bad PSU FOR $85+...
    http://www.ebay.com/itm/Apple-PowerMac-G5-1-8-GHz-DP-Dual-Processor-Bad-PS-/1107 15492187#ht_794wt_1398
    But the 2.3s were the most reliable G5s overall...
    http://www.ebay.com/itm/APPLE-POWERMAC-G5-2-3GHZ-DUAL-CORE-8GB-MEM-500GB-SATA-/3 80363233623
    An hour left on this one...
    http://www.ebay.com/itm/Apple-PowerMac-G5-Dual-Core-2-3Ghz-2GB-250GB-Super-Leopa rd-A1177-/160680216830?_trksid=p4340.m185&_trkparms=algo%3DSIC.NPJS%26its%3DI%26 itu%3DUA%26otn%3D5%26pmod%3D380363233623%26ps%3D63%26clkid%3D4264672915595326464 #ht_6431wt_1165

  • TS3991 I was using a Numbers spreadsheet that had a lot of info on it. It started being difficult regarding inputting things on cells and then suddenly closed. I can't access it either on the iMac or in iCloud. What can I do to get the info back? Do I sto

    Can anyone help me get all my info that is locked in a NUmbers spreadsheet? I was inputting a lot of info when it started being a little difficult, and then it closed down on me. It now will not open telling me that there is no index in it!!
    I need that info and of course it has just happened when I am having problems with loads of houseguests and trying to set up an exhibition. I need that data.
    Please help me someone!

    The proper way to close Firefox is through the File menu "Exit" or the equivalent with the Firefox button.
    More detail in item '''#38 Firefox already running '''
    of
    [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 look like 3.6) (#fx4interface)]
    Firefox already running, to properly shutdown Firefox when closing the last window use File → Exit/Quit (or Firefox button → Exit). Closing Firefox with the [X] in the upper right corner closes the window ("Ctrl+W") but that does not necessarily close Firefox if it has subtasks running. If you want to close and reopen Firefox use the "Restart" within Add-ons if you made a change requiring a restart, or install "[https://addons.mozilla.org/firefox/addon/restartless-restart/ Restartless Restart]" ("Ctrl+Alt+R") which will allow you to take Firefox down and restart without having to check the Windows Task Manager to see if Firefox first actually ended. [http://kb.mozillazine.org/Firefox_hangs Firefox hangs]

  • Repeating User input (such as name and date) on each page automatically

    Is there a way of having the information provided by the user on one page, such as name and date, automatically repeated on separate pages (perhaps as a header/footer.) The input would be via Reader only.
    I have an application form of four pages, after the first page there is no direct unique evidence linking the remaining pages to the first.
    Basically I want each page when printed to have an identifier, so that in the event of the pages getting mixed up, they can be put back together.
    Any advice gratefully accepted

    Hi,
    you can sole your problem with many way...
    - You can use Global binding, so user nter data one time and every field with the same name automaticaly get the same value.
    - You can use some Javascritp to obtain similar effects (more complicated but more fexible):
    Create a Js Object (name it Global for Example).
    Create some variables, i.e.: var field1;
    Place one field in master pages and in their initialize event use the statement below:
    Global.field1 = this;
    In this way you obtayn a refernce that you can use everywhere in your form.
    For example you can write: Global.field1.rawValue = "Hello word";
    I hope this helps :-)
    Bye.
    Roberto.
    (sorry for my poor english);

  • Delete data and then full laod

    BW experts,
    If I am uploading a cube from a ODS with full updates, How can i delete the contents of the cube before the load, and then execute a full load. I know this can be done with the process chain, but what is the way without the process chain?
    Thanks
    Ashwin

    Hi Ashwin,
    In the InfoPackage you can make settings for automatic request deletion:
    http://help.sap.com/saphelp_nw04/helpdata/en/f8/e5603801be792de10000009b38f842/content.htm
    Or check mark for Delete entire InfoCube content in the Data Target tab of the InfoPackage.
    Hope this helps...

  • Can Captivate 5 allow user to answer all questions and then submit?

    Good morning,
    I am doing a management comparision so our team can select our standard quizzing tool.  I am comparing Quizmaker by Articulate and Captivate.  What we are not going to do is say; "this tool is our standard and we will always use it."  We know that not one tool will do everything we need all the time.  But I need to provide the pros and cons of each tool.  Which is root of my question below:
    As for CP, I thought there was a way to allow a users to answer all questions and submit them at the end.  But I cannot seem to find that.  Quizmaker does a really good job with this and the review is really quite good.  I find the skip and back buttons kinda buggy in that a novice user could very easily skip through each and every question and get a 0% at the end.  Ideally, I would like for them to be able to answer all the questions and submit them all at once.
    Can CP5 do this?
    Thanks,
    Eric Fields

    The option to submit all scoring data to the LMS only at the end of the project is dependent on selecting a particular SCORM template when publishing the movie.
    If you have Captivate 5 with the latest update, or Captivate 5.5 this option should appear under the SCORM options.

  • Can I download Purchased music from my iPhone to my wife's using my user id in her iPhone and then login back with her id?

    We both have different ids, I want to download the songs I've purchased in my iPhone using my id to her iPhone. I was thinking to login using my id into her iTunes in her phone and download them and then re-login using her's. Does that work? Does that keep all the songs once I re-login using her's?
    Thanks in advance!

    You can use home share on the pc.
    iTunes: Setting up Home Sharing on your computer

  • TS1702 the  Facebook app is not working as of the last 2 weeks.  It will run for a short period and then go to black

    I have already tried doing all of the troubleshooting suggestions.  I have deleted the app, and reloaded it.  I will work for a while and then stop.  It doesn't really run correctly when I log on through safari either.  It will shut off and take me to the opening screen 5 out of 10 times.

    Try this:
    1. Close all apps in the Task Bar. Double-click the Home button and hold apps down for a second or two. Tap the minus sign to close app.
    2. Hold the Sleep and Home button down until you see the Apple Logo.

  • I have two libraries on the same computer but different logins, there is my user account for the computer and then there is my grandma's, how do i get my music without having to resync on both libraries?

    this computer has two logins, my grandma's (which is the administrator) and mine, itunes is on both logins but on my login i have some music there and hers i have my other music.. i want to be able to redownload my music on my ipod touch with out having to resync back and forth between libraries.. how do i combine the libraries because if i go with one or the other i lose my music i have purchased, on both libaries the music belongs to me not my grandma,
    Also, a few weeks ago, I loaned the IPOD to somebody and they told me that evidently the IPOD had been hacked and that it had lost all the music.  When I got it back, I re-synced it and got some of the music back.  After talking to other people, I now suspect that my "friend" tried to do something he wasn't suppose to to and the IPOD shut down or that he was trying to create an Apple ID of his own without paying for it.  Now that I have it back, I just want to get the music back that I paid for that is already associated with my ID and that is in my two libraries.  I can see them in there (on the computer), I just can't access them to download  them on the IPOD.  Can you help?

    There are actually a few methods for using more than one iPod on a single computer: How To Use Multiple iPods with One Computer
    Just to summarise what's in the link above:
    Method one is to have two Mac or Windows user accounts which by definition would give you two completely separate libraries.
    Method two is to set your preferences so that either one or both iPods get updated with only certain playlists within one library. If you've had no success with this you can have a look through the guide on this page: Loading songs onto iPod automatically
    Another option when using a single library is to set one or both of the iPods to manual update: Managing content manually on iPod
    You can read about Windows user accounts here: Using Windows XP User Accounts

  • High user input output (I/O) and physical reads

    Hi guys
    Recently we have noticed that our database performance degraded significantly. as we looked around in grid control we noticed that the user IO and Physical reads are really high which cause the database to be laggy.
    at first we thought it was memory problem, so we added 2gb to sga. we have set sga to be automatic and it's been like this for the past 2 years.
    how do i trouble shoot this problem. i haven't found any troubleshooting guide for it yet.
    please instruct me on how to solve it
    database: 10.2.0.4 sparc
    regards
    Sina

    Top 5 Timed events
    db file sequential read          23,582          679          29          46.3     User I/O
    CPU time                                        626                    42.7     
    db file scattered read     3,089     70     23     4.8     User I/O
    db file parallel write     3,478     28     8     1.9     System I/O
    log file parallel write     4,201     24     6     1.7     System I/O
    SGA Memory Summary
    SGA regions     Begin Size (Bytes)     End Size (Bytes) (if different)
    Database Buffers     2,768,240,640     2,835,349,504
    Fixed Size     2,050,240     
    Redo Buffers     14,721,024     
    Variable Size     3,657,439,040     3,590,330,176
    Process Memory Summary
         Category     Alloc (MB)     Used (MB)     Avg Alloc (MB)     Std Dev Alloc (MB)     Max Alloc (MB)     Hist Max Alloc (MB)     Num Proc     Num Alloc
    B     Other     569.22     0     2.62     3.14     22     24     217     217
         Freeable     101.63     0.00     0.77     0.45     3          132     132
         SQL     91.51     45.35     0.44     0.76     4     78     209     192
         PL/SQL     12.50     5.57     0.06     0.07     0     4     217     217
         JAVA     5.40     5.38     1.08     0.09     1     2     5     5
    E     Other     603.20          3.03     3.62     22     24     199     199
         SQL     115.21     64.78     0.60     1.67     21     78     191     182
         Freeable     112.31     0.00     0.83     0.43     3          135     135
         PL/SQL     13.89     5.94     0.07     0.12     1     4     199     199
         JAVA     8.93     8.89     1.12     0.23     2     2     
    for some reason i can't paste a table into this post but if you want i can email you above tables

  • I have a 10.2.8 os. I had opened up the AOL logo on the bottom bar. Two aol boxes came up. I can get them to go away for a short time and then they come back. I have not used AOL for 6 years. How can I get the boxes to go away?

    I have a 10.2.8 os on a G4 desktop. A week ago I clicked on the AOL icon in the bottom bar. I have not used AOL for six years. Two aol boxes came up. I can not get the boxes to go away for long. They may go away for 15 minutes and they come back  while I am working. How can I get these  aol boxes to go away?
    I will be upgading to Tiger; 10.4.

    Right click on the AOL icon and select move to trash.

  • Would anyone know how to program the Labview code for the following: Recording an analog input signal for 100msec and then repeating this 100 times in order to finally have an averaged signal (waveform)​?

    I have added a vi, but it doesn't quite work. Would be very grateful if someone could help, thanks!
    Attachments:
    Average_0411041_2.vi ‏77 KB

    The attached VI collects 100 ms of data and does a rolling average. Since your sub-VI were not included I created this from scratch. There are comments in the code. I hope this is what you need.
    Dirk
    Attachments:
    rollingaverage110x100.vi ‏47 KB

  • I want to display all errors in a listbox. Is there a simple way to do this, such as a vi that takes as input: error_in, error_out, listbox and then appends the error text to the listbox if the error_out is different than error_in?

    would like to display time of occurrence and error text, so possibly a table instead of a listbox

    You can check on the alliance page for a product that does this, but there are no LabVIEW utilities to do this specific task. You will have to build one yourself it seems.

Maybe you are looking for

  • GL Trial Balance Report with Source Field

    Hi All, How can we add Source Column to Trial Balance Report. As this Oracle's Seeded report is developed based on GL_BALANCES Table, how can we add source column to this report? Can anyone suggest on this to add source column to this report? If not

  • Problem in importing excel file

    Hi Experts.... I am new in odi 11g. I have created System Dsn for Excel driver. I have created physical and logical schema under Microsoft Excel technology and made new model for Excel file. But when I click on reverse engineer for import the Excel f

  • How can i check the license file installed on the server CCM 6.1.4

    Hi; i have installed the CCM 6.1.4; and now i want to upgrade to 8.5, but i don't remenber witch type license i have uploaded ( normal or Hospitality). how can i check the license file installed on this server??? thanks.

  • ORA-20100: File o0094031.tmp creation for FND_FILE failed.

    wheni create a menu error like this ORA-20100: File o0094031.tmp creation for FND_FILE failed. Plz Help me Step by step Thanks

  • JavaFX and NetBeans

    I having no luck running my JavaFX code on my NetBeans 6.1. I set a Class Path to the javaFX SDK but netbeans insists that the packages don't exsist even though they have the libraries listed. What can I do?