Can you set a letter as a number?

i have to do a GPA calculator program, and i would like to set a=5, b=4, c=3, etc .. so i can multiply the letter grade by the # of credits. does anyone know how i would go about doing this ?

A HashMap would work, a simple Grade class or better an Enum can work nicely too.
I've used an enum like this before:
    private enum Grade
        A('A', 5.0),
        B('B', 4.0),
        C('C', 3.0),
        D('D', 2.0),
        F('F', 1.0);
        private char letter;
        private double score;
        private Grade(char letter, double score)
            this.letter = letter;
            this.score = score;
        ...........

Similar Messages

  • Can you set a song on repeat on iPhone 4s

    Can you set a song on repeat on iPhone 4s

    From the now playing screen, bring up the scrubber bar(tap the screen):
    A small icon that looks like two circular arrows is on the left side below the scrubbing bar. Tap this icon once to repeat the album. The icon will turn blue when repeat is activated. Tap the icon again to repeat the current song. The icon will change to show the number 1 inside a blue circle. Touch the icon a third time to cancel any repeat. The icon will turn white when it's deactivated.

  • Can you set the i pod to play albums one after the other as it seems to stop once its played the one album!! :-(

    can you set the i pod to play albums one after the other as it seems to stop once its played the one album!! :-( thanks

    Unfortunately that is the way the interface is designed. If you select an album from the albums menu, then it plays an album, optionally shuffled and/or repeated. If you select from the artists menu then you should be able to shuffle the albums or songs by that artist or have them played in sequence, again with options to repeat. You can also cue up a number of songs or albums with the On-the-Go playlist feature.
    iPod classic manual
    tt2

  • Can you set up a wireless network/router using only the iPad?

    Can you set up a wireless network/modem/router using only an iPad - if you don't have a computer?

    You actually can as most routers come with a web interface that lets you tinker with all things with regard to set up and connection.
    You have to choose though as there are other routers that would require you to plug-it in to a computer first, as they have a desktop application to make way for easier set-up.
    But for everything else, it is done through a web client which is just like accessing any web site.

  • Can you set up multiple user accounts on one laptop?

    can you set up multiple user accounts on one laptop?

    Of course.
    And instructions can depend on which OS X is installed.
    For v10.7 Lion > OS X Lion: Create a new user account
    For v10.8 Mountain Lion > OS X Mountain Lion: Create a new user account
    When you post for help, please state which OS X is installed.
    If you aren't sure, click About this Mac from your Apple menu 

  • Can you set up apple tv using 2 different itunes accounts from 2 different macs in same household?

    can you set up apple tv using 2 different itunes accounts from 2 different macs in same household?

    No, you can only connect to one Home Sharing account at a time. If you want to see the content of the other Mac's library you will have to turn off Home Sharing on the Apple TV and log back in with the other iTunes account.

  • How can you set up more than one device on iTunes. I have an iPad, iPod, itouch and iPhone. I don't want the same on all devices.

    How can you set up more than one device on iTunes? I have an iPad, iPod, itouch and iPhone. I don't want the same on all devices. I have all my music/videos on iTunes on my mac book pro. Can you set up separate folders for each device and drop in what ever music/videos from the main iTunes library?

    In itunes it is called syncing and you can choose exactly what content to sync to all devices and it can be different for all of them
    How to sync

  • Can you set up multiple Facebook users on 1 IPad 4?

    Can you set up multiple Facebook users(2) on one IPad 4?

    I think maybe on different users on one computer - but not on the same one.

  • Can you set up 2 iTunes accounts on one computer?

    Can you set up 2 iTunes accounts on one computer?

    I had two accounts on one computer until recently. You need to use two user accounts on the computer. Note, I say I did it until recently, therefore I'm not able to confirm this still works, but assume it does.

  • Can you set a second "Open with:" application for a file?

    Hi all,
    I was wondering if something like this exists for OS X Lion or greater: you can set a default application to open a type of file, say Safari for all .html files, but can you set a second default application for a file?
    I usually open files using command + o or command + down arrow from the Finder and I've often thought how good it would be to hit an alternate keyboard shortcut to open the selected file in a secondary default application.
    For example, if I'm making a web page and have the .html selected in the finder I can hit command + o (or command + down arrow) to open it in Safari and if the file isn't open in my editor and is selected in the Finder I can hit, say command + option + o (or command + option + down arrow) to open the .html file in my editor.
    Does anyone know if this can be achieved in OS X Lion or greater?
    Any advice is greatly appreciated.
    Thanks.

    Hi all,
    If anyone's interested in a partial solution, I've rigged up the following.
    I ended up using an Automator action coupled with Spark to capture a keyboard key combination. Spark: http://www.shadowlab.org/Software/spark
    I've used Spark before with good results, and although it's from 2008 it still works on Lion.
    I created an Automator action that does two things:
    gets the selected Finder items
    opens finder items in the text editor I'm using.
    I then saved the workflow as an application so that Spark could run it.
    I've set up a keyboard shortcut that Spark picks up and calls my Automator workflow. It all seems to work nicely.
    So, I've created a specific "open selected file with <text editor>" keyboard shortcut that should do for the time being.

  • Can you set a web page as a 'home page' on the i phone safari as you would?

    Can you set a home page or will the safari button always take you to the last web site you were on?

    You cannot set a Home Page in Safari but if you save your favorite bookmark to the home screen, you can use that to open the browser on iPhone.
    To do this:
    Open Safari and open the page you want for the "Home Page".
    Tap the "+" at the bottom of the screen and select "Save to Home Screen"
    You can then name it whatever you wish and tap Save.
    This will create an icon on the home screen that you can tap on to always open Safari to that page.

  • Can you set different colours for invitees in calendar?

    In calendar on the iphone/ipad can you set any events that you accept from invitees to a different colour so that you can instantly distinguish them from your own events?
    Cheers

    You could choose None in Preferences > General > New Mail Sound and set up a rule for each account in Preferences > Rules as follows:
    If [any/all] of the following conditions are met:
    [Account] [AccountName]
    Perform the following actions:
    [Play Sound] [Sound]
    Problem is, that would cause the sound to be played for junk mail as well — probably not what you want.

  • HT1677 Where can you set default in Safari to view as web page instead of Mobile Version?

    Where can you set the default setting in Safari to open page as web page instead of Mobile Version on iPad running iOS6.01?

    And, to make it even more fun, sometimes a website changes how it deals with Safari Mobile. A website that treated it like a desktop browser suddenly starts treating it like a cell phone. Just to mess with you. Or push an app.
    Best of luck.

  • In Initial View, can you set defaults for Navigation tab, Page layout, and Magnification?

    Adobe Acrobat 9 Pro V9.4.0
    Win7 Pro x64
    Problem: In Initial View, can you set defaults for Navigation tab, Page layout, and Magnification?
    Every time Acrobat scans a document, I have to go to Initial View to set Navigation tab, Page layout, and Magnification. It does not remember the settings I last used.
    Thanks in advance.

    See my response to this post

  • Can you set a project wide time limit?

    I know that you can set a time limit for each question, can you set a time limit for the entire project?

    That variable has really no sense. First of all, you have to create it and it will just be toggled when time is over. I think it is just taken over from the former Timer widget (Timer widget... to stress your learners - Captivate blog) where it had sense, because it didn't have the same functionality of jumping to a slide when time was over. Beware: the timing is not very accurate, it will start with a delay of about 1 second if you put it on the first slide (display for rest of project), and when time is over the message (you cannot escape from it) will display for 2 seconds. Had planned to blog about Timing/Hourglass interactions, but have too many plans that I didn't realize.

Maybe you are looking for

  • New Ipad cannot connect to i-Tunes for setup without Wi-fi, but iphone will connect

    I just bought a new Ipad and I keep getting the error message.  I don't have access to wifi, so I have to use Itunes (connected to my computer). Problem is, when I plug in the ipad I get the following error message: "We could not complete your itunes

  • Reset Cisco IP phone in branch office

    Hi,  I have remote side and I need to do factory reset to the phones there. How can i do remote factory reset on those phones without going there and do it manually? Regards,

  • Can ODI agent (scheduler) be configured?

    Hi, I have an ODI project, and an agent associated to this project. The agent is scheduled to run every 2 hours. My questions are: 1. The agent doesn't provide a time gap of more than 2 hours. What do I need to do in case I have to run my ODI process

  • Please send me a no squint so i could use it

    can you please send me the link where i can down load the no squint that is compatible to your 7.0 version?

  • Oracle 11201 Linux setup installation on VM ware

    Hi All, I have just downloaded oracle 11.2.0.1 for linux 32 bit setup from Oracle site. Now i want to install this set up on VM ware, but the VM ware is asking for an ISO file for the same. How to convert this to a image? Kindly tell me how to procee