How do I get a calculation from an Interface?

Money calculateGrossPay();
is part of my interface, I have to calculate the grossPay and I can't convert between double and Money.
Can you tell me how?
I don't have the option of changing the rate to a double. I have to make it work like this.
private Money rate;
private double hoursWorked;
public Money calculateGrossPay()
return grossPay;
}

This is the whole code for my interface. Basically it sets up a salaried employee and an hourly employee. I have to code the methods to calculate their gross pay, net pay, taxes....
public interface Employee
* Return the first name of the employee.
* @return the first name.
String getFirstName();
* Change the first name of the employee to the given parameter.
* @param firstName the new first name.
void setFirstName(String firstName);
* Return the last name of the employee.
* @return the last name.
String getLastName();
* Change the last name of the employee to the given parameter.
* @param lastName the new last name.
void setLastName(String lastName);
* Return the ID of the Employee.
* @return the ID.
String getId();
* Change the ID of the employee to the given parameter.
* @param id the new ID.
void setId(String id);
* Return the number of tax-related dependents.
* @return the count of dependents.
int getDependents();
* Change the number of dependents for this employee.
* @param dependents the new dependent count.
void setDependents(int dependents);
* Calculate the gross (pre-tax) pay for this employee.
* @return the pre-tax pay for this employee.
Money calculateGrossPay();
* Calculate the taxes (based on pay and dependents) for this
* employee.
* @return the amount of tax that should be deducted from the gross pay.
Money calculateTaxes();
* Calculate the net pay required. Net pay is the result of subtracting
* the taxes from the gross pay.
* @return the net pay for this employee.
Money calculateNetPay();
* The number of pay periods in a year. One per week.
static final int PAY_PERIODS = 52;
* The number of "regular" hours in a pay period. A standard
* forty hour work week is the default.
static final double HOURS_PER_PERIOD = 40;
}

Similar Messages

  • How can i get all values from jtable with out selecting?

    i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
    Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
    thanks in advance.
    raja

    You could set the table's data model to be the same:
    output2.setModel( output1.getModel() );

  • How do you get your apps from the i tunes library onto your mac?

    how do you get your apps from i tunes library onto your mac

    You don't.  Apps from iTunes are for iOS devices.  Apps for the Mac come from the Mac app store.  Click the apple >> app store.

  • How do I get all contacts from my iphone 4 to icloud?

    how do I get all contacts from my iphone 4 to icloud? I've just got some of them.

    All you have to do is enable iCloud on your phone and turn notes on.  They should automatically appear on your phone.

  • How do I get exchange contacts from my iphone up to iCloud?

    How do I get exchange contacts from my iphone up to iCloud?
    I am so bummed if there isnt a way....sigh
    thanks, Jamie...

    Jepper wrote:
    I am so bummed if there isnt a way....sigh
    Company Exchange account? If so, this is the way most employers want things.

  • How do I get voice memos from an un-synced iPhone onto a MacBookPro?

    How do I get voice memos from an un-synced iPhone onto a MacBookPro?
    Problem: when I click Sync I get a warning stating "Are you sure you want to sync music? All existing songs and playlists on the iPhone “Jarrod Vassallo’s iPhone” will be replaced with songs and playlists from your iTunes library."
    I don't care if the iPhone syncs with the laptop (and the music is lost), I just cannot afford to lose the Voice Memos too as they are very important. Any suggestions?

    To follow this user tip using iTunes 11, fist go to View>Show Sidebar.  Also, Transfer Purchases (step 5) is now in File>Devices.
    If they're too large to email and you don't want to sync, the only other option is to use 3rd party software to transfer them using usb, such as PhoneView (Mac only) or Touch Copy (PC or Mac).

  • How do you get a RESPONSE from Verizon?

    How does one get a response from Verizon?  Here's my situation...
    Given the amount of trouble that I have had with a recent order, you would think that I was trying to land a 747 jet on my roof.  In reality, all I was aiming to do was to cancel the $19.99 per month phone service that I never used.  I do not even own a phone, for that matter.  I also had enhanced high speed Internet, and I wanted to retain the high speed Internet.  A few days before January 13, 2012, I called Verizon and spoke to the 1st sales representative, who ensured me that it was no problem to cancel the phone service and yet retain the high speed Internet for the same monthly price.  24 hours later, my high speed DSL service was no longer functioning.  I will try to briefly explain the disastrous customer service that ensued. 
    The first several phone calls to Verizon were not productive as I was transferred to the wrong department, and then at least one of my phone calls was dropped by the Verizon server.  The representative did not call me back.  I finally got in touch with a technical support representative, the 2nd Verizon representative, who informed me that the high speed Internet had been turned off and that I had to speak to a sales representative to solve the issue.  Another sales representative, the 3rd Verizon representative, informed me that the 1st representative had cancelled my phone line, and thus cancelled all of my services.  Great.  The 3rd representative informed me that he was absolutely capable of handling the problem and that he would simply add a new order for high speed Internet, which was to be activated the next morning.  The next morning came and went, and guess what?  No Internet.  I called again.  The 4th Verizon representative told me that everything that had been done previously was incorrect and that the sales department is not capable of making such changes.  She told me that she could not help me and that my claim had to be submitted to a different department, which has the authority to un-do all of the previous changes.  She told me that I would receive a call back the same day to resolve the issue.  Given my previous experiences with Verizon, I was confident that I would not, in fact, receive a call back and so I asked her how I could get transferred to this department, if I needed to call again.  She said that I could not be transferred.  Okay.  So then I asked her what to ask for so that next time I called, I could be transferred to the correct department without dealing with yet another sales representative who gives me yet a different story.  She informed me that she could not provide that information to customers.  The Department That Shall Not Be Named (and that I cannot contact) did not call me, and I was not surprised.  Unfortunately, I did not know how to go about contacting them, because, as I was told, customers aren’t allowed to do that. 
    The 6th phone call to Verizon was dropped by the Verizon server.  The 7th phone call to Verizon went to the 5th Verizon representative, a sales associate who placed us on hold for the first 15 minutes only to inform us that she could not find any record of our Internet service.  What the heck was she doing, checking her Facebook account?  She finally returns, puts us on another extended hold, and then adamantly tells us that we need to speak with technical support, which, if you recall, was the first Verizon party that I spoke at the beginning of this debacle.  The 5th  representative transfers me again to technical support.  Of course, the technical support personnel, the 6th Verizon representative said what the first one did, that the account was inactive and that we needed to talk to the sales department.  My husband was on the phone at this point because I was DONE.  When the 6th technical support representative tried to transfer him back to the sales department, my husband insisted that the 6th technical support representative remain on the line while we spoke to yet another sales representative, the 7th Verizon representative.  The 6th technical support representative patiently waited with us while we sat in yet another long queue to speak with a member of the sales department. 
    The 7th sale representative, from the retention department based out of New Jersey, found that all previous orders had been set up erroneously.  She cancelled the old orders and reinstated a completely new order.  The DSL began working a few days later.  MAGIC.  She then left me a voicemail message saying that she would eliminate the activation and shipping fee (duh) as I never canceled the account to begin with and as I already had the equipment.  She also applied a coupon to reduce the price to around $30 per month, assured for the next 2 years.  I was relieved. 
    You can imagine our frustration then when we received the bill for $79 on February 6, 2012, which included a much higher monthly rate (around $45) and the shipping and activation fee of $19.99 that we were assured we would not pay. Again, nothing was shipped to us because we already had the equipment.
    Our next phone call to Verizon landed us with a guy, the 8th Verizon representative, who had no intention of helping us.  According to him, there was no record of these wrongs, and despite the fact that we had an old account number and three order numbers that were screwed up, he did not deem that there was enough evidence to change our monthly bill.  (Unfortunately, the 7th Verizon representative did not make notes or appropriately document the situation on the new account.)  The 8th Verizon representative then had the audacity to comment that we could be lying to him, yet he was unwilling to view the evidence that we could have presented.  Instead, he suggested that we call tech support again and try to go through the same process to get connected to the mysterious “retention department” which he knew nothing about. 
    At this point, I was beyond fed up.  The attitude of the 8th Verizon representative put me over the edge.  I filed a complaint with the Better Business Bureau (BBB) with an abbreviated version of this story.  I did not file the complaint to get back at Verizon.  Instead, I filed the complaint because I knew that another phone call to Verizon would be useless.  I’ve been dealing with this issue for over a month, and I’m sick of it.  I have better things to do with my time, believe it or not, and this situation has resulted in a significantly waste of my time over what, in my opinion, was a very simple issue to resolve. 
    The BBB processed the complaint and I was contacted last Friday afternoon by a Verizon representative (the 9th) who said that she was looking into the matter and that she would respond to me within two to three business days.  Well, it’s almost the end of the week, and I have received no response.  Again, after all of this, how could I be surprised? 
    I have been a Verizon customer, wireless and residential, for as long as I can remember, but I am reaching the point of outrage.  This situation is truly unacceptable. 
    You would think that, in 2012, with all of the technology available to us and the fact that Verizon is a COMMUNICATIONS COMPANY, that at least Verizon employees would be able to make a basic change to an existing order and that at least one out of 9 Verizon representatives would be able to solve this issue in a span of over four weeks.  Think again. 
    How does one get a response from Verizon? 

    dougiedc wrote:
    It boggles the mind.  The Verizon store on L Street downtown Washington, D.C. cannot access my Verizon account.  They can only sell cellphones then it's up to me to contact Verizon on my own to get the hook up. I even asked "Are you Verizon employes?  Is this a vendor store or is it really a Verizon owned and operated store?"  The answer "Yes, we are Verizon employes, yes this is a Verizon owned and operated store" ...
    Yes, it indeed boggles the mind.  I'm of course referring to the fact that your post concerns Verizon Wireless products and services.  This forum is dedicated exclusively to Verizon Communications services.   As you probably know, Verizon Wireless and Verizon Communications operate as separate companies.
    If you need help for a Verizon wireless product or service, it's best to direct questions to the Verizon Wireless forums.  You can reach them by clicking on "Wireless" (either here or at the top of the page).
    Good luck and I sincerely hope you get your issue resolved.

  • HT204053 how do i get all pictures from my phone in icloud to my macbook

    I recently had to buy a new hard drive for my macbook and I am having problems transferring photos.  How can i get my photos from my phone in iphoto?  I had

    Setting/Photos & Camera/My Photo Stream.
    Then enable it in iPhoto on the computer.

  • How can i get thes songs from ipod nano to the itunes libary??

    hi
    i have ipod nano and i sync it with over 500 songs .....my bad i lose all that songs on my libary  .... how can i get thes songs from ipod nano to the itunes libary??

    See this older post from another forum member Zevoneer on different ways to copy content from your iPod to your computer.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • How we can get the values  from one screen to another screen?

    hi guru's.
         how we can get the values  from one screen to another screen?
              we get values where cusor is placed but in my requirement i want to get to field values from one screen to another screen.
    regards.
      satheesh.

    Just think of dynpros as windows into the global memory of your program... so if you want the value of a field on dynpro 1234 to appear on dynpro 2345, then just pop the value into a global variable (i.e. one defined in your top include), and you will be able to see it in your second dynpro (assuming you make the field formats etc the same on both screens!).

  • How do I get the values from a form?

    How do I get the values from a form?

    You can try using request method..
    request.getParameter("yourFormInputName");
    Try this.

  • How can i get all links from html file ?

    I tried some code:
    List<string> metas = new List<string>();
    string text = "";
    string mys = "";
    public List<string> LockedThreads(string filename)
    HtmlWeb web = new HtmlWeb();
    HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
    doc.Load(filename, Encoding.UTF8);
    var metaTags = doc.DocumentNode.SelectNodes("//meta");
    if (metaTags != null)
    foreach (var tag in metaTags)
    if (tag.Attributes["name"] != null && tag.Attributes["content"] != null)
    text = tag.Attributes["name"].Value;
    mys = tag.Attributes["content"].Value;
    var linksOnPage = from lnks in doc.DocumentNode.Descendants()
    where lnks.Name == "a" &&
    lnks.Attributes["href"] != null &&
    lnks.InnerText.Trim().Length > 0
    select new
    Url = lnks.Attributes["href"].Value,
    Text = lnks.InnerText
    foreach (HtmlNode node in doc.DocumentNode
    .SelectNodes("//a/@href | //img/@src"))
    metas.Add(node.Name);
    In the var linksOnPage i'm getting all the links but some of them not only links for example the first item i see:
    [0] = { Url = "/", Text = "&nbsp;&nbsp;&nbsp;&nbsp;" }
    Then the second item:
    [1] = { Url = "http://rotter.net/cgi-bin/forum/dcboard.cgi?az=login", Text = "התחבר" }
    Next i want to add another loop or variable that will contain only the links after im src for example:
    <img
    src="http://mysite.com"
    border="0"></a></TD><TD
    ALIGN="right"
    VALIGN="TOP"
    WIDTH="55%">
    So to get only http://mysite.com
    So in the end i will have two Lists:
    First List will contain all links from the html file.
    Second List only links that are in img src

    Ok i'm using regex now and i can get the links i need:
    List<string> metas = new List<string>();
    List<string> metas1 = new List<string>();
    string text = "";
    string mys = "";
    public List<string> LockedThreads(string filename)
    string[] fall = File.ReadAllLines(filename);
    foreach (string hh in fall)
    if (hh.Contains("http://rotter.net") && hh.Contains("locked")||
    hh.Contains("locked_icon_general") ||
    hh.Contains("locked_icon_anchor") ||
    hh.Contains("icon_anchor") ||
    hh.Contains("locked_icon_fire") ||
    hh.Contains("locked_icon_sport")||
    hh.Contains("locked_icon_camera")||
    hh.Contains("locked_icon_movie"))
    Regex linkParser = new Regex(@"\b(?:https?://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
    foreach (Match m in linkParser.Matches(hh))
    metas.Add(m.Value);
    So now in the metas i have in this case two links.
    For example the first link is from this block in the file:
    The link i got is : http://rotter.net/forum/Images/hot_icon_anchor.gif
    And this is the right link from this block but now how do i get the text from this block and how i connect how do i know that this text belong to the link ? I need to add this text from this block to a new List. Before all that i counted on my own lines
    and got the text but that's a bad idea.
    I need somehow to get: שרשור תשדירי בחירות מרוכז:
    To get the text between the ToolTip',' and the second ',' but not from all the html file only in places of this two links i extracted.
    <TD ALIGN="RIGHT"
    VALIGN="TOP">
    <body onmousemove="overhere()">
    <a onmouseover="EnterContent('ToolTip','שרשור תשדירי בחירות מרוכז:','<u><span style=color:#000099;>כתב: menahem בתאריך: 03.03.15
    שעה: 08:51</span></u><br>1.<br>http://youtu.be/utUaqyiRkJ8<br><br><br>...'); Activate();"
    onmouseout="deActivate()"
    href="javascript:void(0)">
    <img src="http://rotter.net/forum/Images/hot_icon_anchor.gif"
    border="0"></a></TD><TD
    ALIGN="right"
    VALIGN="TOP"
    WIDTH="55%">
    <FONT CLASS='text15bn'><FONT
    FACE="Arial">
    <a href="http://rotter.net/cgi-bin/forum/dcboard.cgi?az=read_count&om=187966&forum=scoops1"><b>
    <font color="red">שרשור תשדירי בחירות מרוכז:</b>
    </a></font></TD>

  • How can I get all photos from iPhoto to automatically back up to iCloud from my Mac OSX Version 10.6.8 operating system.  Not enough memory to upgrade.

    How can I get all photos from iPhoto to automatically back up to iCloud from my Mac OSX Version 10.6.8 operating system.  Not enough memory to upgrade.

    You can't.  iCloud is not for general file backup from a Mac. It's for backup up and syncing data between mobile devices and and Macs and  The following is from this Apple document: iCloud: Backup and restore overview.
    iCloud automatically backs up the most important data on your (mobile) device using iOS 5 or later. Once you have enabled Backup on your iPhone, iPad, or iPod touch .....
    What is backed up
    You get unlimited free storage for:
    Purchased music, movies, TV shows, apps, and books
    Notes: Backup of purchased music is not available in all countries. Backups of purchased movies and TV shows are U.S. only. Previous purchases may not be restored if they are no longer in the iTunes Store, App Store, or iBookstore.
    Some previously purchased movies may not be available in iTunes in the Cloud. These movies will indicate that they are not available in iTunes in the Cloud on their product details page in the iTunes Store. Previous purchases may be unavailable if they have been refunded or are no longer available in the iTunes Store, App Store, or iBookstore.
    You get 5 GB of free iCloud storage for:
    Photos and videos in the Camera Roll
    Device settings (for example: Phone Favorites, Wallpaper, and Mail, Contacts, Calendar accounts)
    App data
    Home screen and app organization
    Messages (iMessage, SMS, and MMS)
    Ringtones
    Visual Voicemails
    But not from a Mac.  If you want to backup your photos and other important files I suggest you get an external hard drive and use  it with Time Machine.
    OT

  • How can I get all photos from the camera roll onto the photo stream so they will share between iphone and ipad?

    How can I get all photos from the camera roll, and all new pictures taken, to get on the photostream so they can share between iphone and ipad?

    When turning PhotoStream on with photos available in the Camera Roll, only photos captured by the iPhone or saved on the iPhone are placed in the PhotoStream.
    For all photos that were in the Camera Roll prior to turning PhotoStream on, import the photos with your computer and add the photos to your PhotoStream on your computer.

  • How do I get all music from my iPod classic to itunes on my computer?

    How do I get all music from my iPod classic to itunes on my computer? I was able to "authorize" the purchased music (40 songs) to download to laptop but I can't select my entire library (1500 songs) to download to laptop!

    Recover media from iPod
    See this post from forum regular Zevoneer for options on moving your iPod data back to your computer.
    tt2

Maybe you are looking for

  • How many iCloud accounts can you create on Mac?

    I use different emails for different purposes (subscriptions,  shopping, forums, iTunes, etc.). With that in mind, I created 3 iCloud email accounts on my iPad and upon trying to register a 4th one I was told that this device is no longer eligible to

  • Hprof doesn't show cpu times of own methods

    Hi, I'm using hprof like this on Java 1.4.2_18: -Xrunhprof:cpu=times,file=/some/file.txt This generates output like this: 1258 0.01% 91.01% 2899 2050 org.apache.axis.encoding.SerializationContext.startElement 1259 0.01% 91.02% 31041 1051 java.util.Ar

  • Email password copy/paste - Nokia 5230

    I have a 64bit password for the email I want to synchronize with my phone. Its random letters and numbers. I want to be able to copy paste that to the relevant field. Or I want to disable the "hide password" option (where anything I type is converted

  • OAM error messages

    Hi How to capture error messages in OAM i.e. user account locked, invalid credentials, not authorized etc. We want some error codes to be recognized for displaying appropriate messages to the user. How to do that and what all error codes/messages can

  • Song are on my ipod  in da computer but

    hi when i go to play song on the ipod theres nothen there like i didnt even download anything but when i plug back up to da computer it say my song are there help