Anybody want to help me, please...

First of all, I'm not sure about the constant values. I wasn't sure so I just guessed. Are they totally wrong, or does it not matter?
The part that I'm confused about is the end where it says "endingTotalTime", in the assignment it says we're supposed to use / and % with 60 minutes per hour. I'm not really sure how to use the % in the program.
public static void main(String[] args) {
     //Declare constant values
     int TimeInHours = 1;
     int TimeInMinutes = 60;
     //Declare variables used to store user input
     String userInput;
     int startInHours;
     int startInMinutes;
     int durationInHours;
     int durationInMinutes;
     //Get the start time in hours from the user
     System.out.print("Enter the starting time in hours: ");
     userInput = SimpleIO.readLine();
     TimeInHours = Integer.parseInt(userInput);
     //Get the start time in minutes from the user
     System.out.print("Enter the starting time in minutes: ");
     userInput = SimpleIO.readLine();
     TimeInMinutes = Integer.parseInt(userInput);
     //Get the duration time in total hours from the user
     System.out.print("Enter the duration time in hours: ");
     userInput = SimpleIO.readLine();
     durationInHours = Integer.parseInt(userInput);
     //Get the duration time in total minutes from the user
     System.out.print("Enter the duration time in minutes: ");
     userInput = SimpleIO.readLine();
     durationInMinutes = Integer.parseInt(userInput);
     //Declare variables used for calculations
     int endingTotalTime;
     int endingHours;
     int endingMinutes;
     //Calculate the total time
     endingTotalTime =

public static void main(String[] args) {
//Declare constant values
int TimeInHours = 1;
int TimeInMinutes = 60;
//Declare variables used to store user input
String userInput;
int startInHours;
int startInMinutes;
int durationInMinutes;
//Get the start time in hours from the user
System.out.print("Enter the starting time in hours: ");
userInput = SimpleIO.readLine();
TimeInHours = Integer.parseInt(userInput);
//Get the start time in minutes from the user
System.out.print("Enter the starting time in minutes: ");
userInput = SimpleIO.readLine();
TimeInMinutes = Integer.parseInt(userInput);
//Get the duration time in total minutes from the user
System.out.print("Enter the duration time in minutes: ");
userInput = SimpleIO.readLine();
durationInMinutes = Integer.parseInt(userInput);
//Declare variables used for calculations
int endingTotalTime;
int endingHours;
int endingMinutes;
//Calculate the total time
endingTotalTime = (startInHours * 60) + startInMinutes + durationInMinutes;
endingHours = endingTotalTime / 60;
Ok, that's everything I have so far. Now I'm supposed to calculate endingHours and endingMinutes, but didn't I technically already solve for endingHours up there. ^^
On the line that says endingHours = endingTotalTime / 60???

Similar Messages

  • I accidentally put a passcode lock on my iPhone and I forgot what I set for it, is there a way to take it off without accessing the phone? I have restored my phone but it doesn't work, is there anybody that could help me please?

    I accidentally put a passcode lock on my iPhone and I forgot what I set for it, is there a way to take it off without accessing the phone? I have restored my phone but it doesn't work, is there anybody that could help me please?

    You can't "accidentally" put a passcode on any iPhone...its a multi-step process. Further, restoring an iPhone will remove the passcode, as the passcode is not included in an iPhone backup.
    Are you sure you're talking about the phone passcode & not something else...like the "Restrictions" passcode?

  • Media encoder hates me...Anybody want to help? I need this file exported within 5 hours.

    So about a month ago I reinstalled media encoder because it decided that it doesn't want to work anymore and would simply give me an error telling me it couldn't open everytime I'd try to use it.
    Now I'm trying to export a premiere file and when I click start que it gives me a warning sign that says "Could not read from source, please check if it has been moved or deleted"
    The only time I moved a I was working with was moving the raw footage from my desktop to a folder on my desktop with the rest of the files I'm using in it.
    When I check the error log file everything appears to be correctly located, I also made sure that the temporary file it creates to export is where it says it is...so I don't know why it's giving me this message.
    I really don't know what to do, I"m about to just delete premiere and media encoder and reinstall both of them soon, in hopes that magically they will work...
    I'm using the mac version too if that makes a difference.

    "Could not read from source, please check if it has been moved or deleted"
    You admitted to having moved your files from the desktop to a folder on the desktop. That could well be your problem.
    You need to get PR to recognize the new location of your files. When you start your project, PR asks for the new location. You answer that question, the rest of your files will automatically be located. Then save your project, exit and restart PR. It should now automatically find all your files. If you have done this, is your problem solved? If not, answer the 16 questions Eddie pointed you to.

  • [XFCE] Anybody want to help me make a user switching patch?

    I love my XFCE desktop, but I hate not being able to switch users or lock the screen (I use LightDM). I Googled for a while now, and there doesn't seem to be any solution to this problem except for using a GDM-only applet that looks quite out of place (and can't lock the screen).
    Since there isn't a way to do fast user switching, does anyone have any information about hacking with the logout application? If XFCE had multi-user capabilities, it would be my perfect lightweight DE.
    Anyone up for this?
    Last edited by Blender (2011-09-29 17:16:59)

    graysky wrote:
    Leonid.I wrote:
    graysky wrote:GDM + xscreensaver does the trick...
    So... after you executed xscreensaver-command -lock, how do you switch users? With gdmflexiserver?
    Yes, sorry.  Details:  Compiling with the "--with-login-manager" flag will make a button called "New Login" that points to /usr/bin/gdmflexiserver to allow user switching if the using gdm as the greeter. This would be value added for folks using xfce4, lxde, openbox, etc. since gnome-screensaver does not provide functionality on non-gnome systems with version 3 (depends on gnome-session).
    https://bugs.archlinux.org/task/25617
    Aha... thank you

  • I have photos in my camera roll that I have saved to other albums on my iPod but if I want to delete it from my camera roll the only option I have is to delete everywhere, which I don't want to do! Please help!

    Ok really need help! Added photos from camera roll to other albums all on iPod not computer. Now I want to delete some from camera roll but the only option I am given is to delete everywhere which is what I don't want to do! Please tell me what I can do

    Well you can sync your iPod/iPhone to yur computer or laptop then take the photos off of your iPod like taking photos of of a SD card (from a normal camera) or off of a USB..! Good Luck. plz tick this saying This solved my question if it helps you.

  • I have a business and I use iCal for all my appointments, how can I print receipts from my MacBook to a receipt printer? I want my clients to have a receipt of the services that they have paid for, can anyone HELP ME PLEASE?

    I have a business and I use iCal for all my appointments, how can I print receipts from my MacBook to a receipt printer?
    I want my clients to have a receipt of the services that they have paid for, can anyone HELP ME PLEASE?

    Well...I went to the modem (Westell, WireSpeed), found the NAT settings, once again, I'm WAY over my head, I am assuming this is a TCP connection (as opposed to a UDP) and per Lorex my mobile devices will use port 1025.  So I gave it a "global port range" of 1-10 and I indicated that the "base host port" was 80, 1025, & 9000 (ports 1,2,3).  When I selected the 'enable' it asked for a "host devise" my choices are my IPhone, IMac and the IP address for the dvr, so I choose the dvr.  I still cannot connect and canyouseeme still can NOT find these open ports.  This is taking up my whole day! I don't know how people figure this stuff out.

  • Is there another way i could turn my phone on? it wont turn on or show me the battery screen to show its charging. i already tried to hold the on and home button at the same time but it does not want to turn on. please help?

    is there another way i could turn my phone on? it wont turn on or show me the battery screen to show its charging. i already tried to hold the on and home button at the same time but it does not want to turn on. please help?

    Device Not Recognised
    For PC
    http://support.apple.com/kb/TS1538
    For Mac
    http://support.apple.com/kb/ts1591

  • Hi could someone help me please ? Ive just bought the new ipad and want to put some movies on it. I have already converted some movies using handbrake and tried to transfer them to my ipad and it just wont work. ive tried drag and drop and everything

    Hi could someone help me please ? Ive just bought the new ipad and want to put some movies on it. I have already converted some movies using handbrake and tried to transfer them to my ipad and it just wont work. ive tried drag and drop and everything

    bluztoo wrote:
    Haven't really used any of them including VLC - actually use netflix on the ipad more than anything. I was able to drop an mp4 into imovie on my ipad and see it there. This was something I had shot as avhcd and converted with turbo.264. Played fine. Probably not what you want for a movie player though.
    Well, turbo.264 is indeed very nice to have - even for converting full-sized movies. (Nevertheless, TechRadar's latest roundup (see http://www.techradar.com/news/software/applications/6-of-the-best-video-converte rs-for-mac-1074303 ; also linked from another roundup at http://www.iphonelife.com/blog/87/benchmark-excellent-multimedia-converter-handb rake-vs-commercial-apps ) has shown it's still worse than HandBrake in most respects.)
    All H.264 files (assuming they are H.264 level 4.1 or lower) are compatible with the built-in Videos app.
    bluztoo wrote:
    Those of you who use other players, what do you reccomend? Just curious.
    It entirely depends on your needs. The top players (AVPlayerHD / ProPlayer, It's Playing, GoodPlayer) all have different strengths and weaknesses. I myself use It's Playing the most as I convert everything into MP4 and simply love the DSP's (brightness / volume / saturation boosting). (Its software decoders are definitely worse than those of AVPlayerHD / ProPlayer; however, MP4's are played back from hardware.)

  • Hey, I'm having trouble launching Itunes, I wanted to updated but it didn't open so I wento to this page and downloaded the latest version, and now Itunes doesen't want to launch again. Help me please and also I wanted if my music is going to be erased?

         Hey, I'm having trouble launching Itunes, I wanted to updated but it didn't open so I wento to this page and downloaded the latest version, and now Itunes doesen't want to launch again. Help me please and also I want to know if my music will be erased?!?! Sorry for my ignorance but i'm not good at this kind of stuff. I will aprecciate a lot if you could help me please!!!! :c

    Hi cheperrumps,
    Welcome to the Support Communities!
    Uninstalling or reinstalling the iTunes application won't affect your music (data) -- but it's always a good idea to have a backup!
    The information below will show you how to do that and to troubleshoot your issue with iTunes:
    iTunes: Back up your iTunes library by copying to an external hard drive
    http://support.apple.com/kb/ht1751
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/ts1717
    Cheers,
    - Judy

  • Hi there, I want to change the background-color of the browser, when a popup-picture is shown. This picture pops up by clicking a hyperlink in the text...can anyone help me please...thanks a lot

    Hi there, I want to change the background-color of the browser, when a popup-picture is shown. This picture pops up by clicking a hyperlink in the text...can anyone help me please...thanks a lot

    Hi,
    CSS is interpreted by your browser, so server cache seems unlikely in htis case. There is however some hierarchy in CSS, so parts of the APEX CSS, theme CSS or page CSS might overwright or block yours.
    Does changing the CSS on runtime affect your page? Eg, run the following in your browser console and see if your page turns black: $('#uBodyContainer').css("background-color","black")
    Also try moving up your css in the hierarchy labeling it as important:
    div#uBodyContainer { 
      background-color:#000000 !important;  
    See:Assigning property values, Cascading, and Inheritance
    Regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • Hello! I have some my violin recorded audio files and want them to be converted to printable notation throw "audio to score"from Factory. But do not have a normal result. Could someone help me, please. .

    I have some my violin recorded audio files and want them to be converted to printable notation throw "audio to score"from Factory. But do not have a normal result. Could someone help me, please. .

    seeren wrote:
    Normal result is on the sloppy side of inaccurate.
    Wish I'd started this topic so I could give you a green star!
    Great description.

  • My children remove my iphone 4 in Icloud - find my phone and now i don't see my device in this services. I want to return it. Help me please!

    My children remove my iphone 4 in Icloud - find my phone and now i don't see my device in this services. I want to return it. Help me please!

    Welcome to the Apple Community.
    You can turn Find my Phone on/off in settings > iCloud.

  • I want to know e-mail address Apple.help me please

    Hi all
    help me please.  i come from Thailand i want to delete my money. i want to use Thai Store. i have money 0.04$
    Sorry i can write English a little.

    Click here and ask the iTunes Store staff to zero your account balance.
    (103327)

  • When i want to install itunes 10.5 there is an error (some keys are not found). Can someone help me, please???

    When i want to install itunes 10.5 there is an error (some keys are not found). Can someone help me, please???

    I have solved the Problem

  • My ipad is disabled and I updated it, then the apple id and password were required I entered it but the itunes says this email cannot be used to unlock this ipad. So what can I do?  anybody help me please.

    My ipad is disabled and I updated it, then the apple id and password were required I entered it but the itunes says this email cannot be used to unlock this ipad. So what can I do?  anybody help me please.

    is it the ipad that is disable or your Apple ID?
    This article contains instructions on what to do if have forgotten your passcode or  your device is disabled:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Contacting apple id support
    http://www.apple.com/support/appleid/contact/

Maybe you are looking for