Arrays that work with Java Class

Good Day all.
Currently, I am working on a program that is giving me a bit of trouble starting...can anyone give me assistance and try to tell me what I am doing incorrectly?
Here is the tasking:
Main Method
1. Output statement to screen saying this program will accept hours worked for 3 employees.
2. Declare an Integer Array to hold 3 employees hours. Call this array "employees"
3. Main Method then calls inputData Method (Passing array as argument) do not accept any return value.
4. Main Method then calls outputData Method (Passing array as argument) do not accept any return value.
import java.util.*;
import java.text.DecimalFormat;
public class Arrays
{ /*This starts the Arrays*/
     public static void main (String[] args)
     Scanner scannerObject = new Scanner(System.in);
     Scanner keyboard = new Scanner(System.in);
inputData(employees);
     System.out.println("This program will accept hours worked for 3 employees.");
     String[]employees = new String [3];

How am I coming along....I started with the MAIN Method...Now I have started and created a MONSTER with this other portion of my program
Main Method
1. Output statement to screen saying this program will accept hours worked for 3 employees.
2. Declare an Integer Array to hold 3 employees hours. Call this array "employees"
3. Main Method then calls inputData Method (Passing array as argument) do not accept any return value.
4. Main Method then calls outputData Method (Passing array as argument) do not accept any return value.
InputData Method (Receives Arrary)
1. Gers input using a for loop for each employees hours into the array elements.
2. Prompt the user with the following phrase. Enter hours worked for employee #: (Where # is the employee number 1-3)
Can anyone tell me what is going god awfully wrong with this program? LAUGHING
SUSAN
import java.util.*;
import java.text.DecimalFormat;
public class CS219Arrays
{ /*This starts the Arrays*/
public static void main (String[] args)
Scanner scannerObject = new Scanner(System.in);
Scanner keyboard = new Scanner(System.in);
int numberOfHours = 0;
System.out.println("This program will accept hours worked for 3 employees.");
String[]employees = new String [3];
for (int index = 0; index < employees.length; index ++)
System.out.println(employee[index]);
/*** Used to get input from the user and store the results in an array
@param employees The array to store the data that the user enters in*/
public static void inputData(String[] employees) {
// Get user input and place it in the employees array
/*** Used to output the data @param employees the array to output*/
private static void outputData(String[] employees) {
// Display each element of the employees array
System.out.println("Enter hours worked for employee #: (where # is the employee number 1-3)");
numberOfHours = keyboard.nextInt();
}

Similar Messages

  • Java Class (Compiled with JDK6_u12) that works with UCCX 9.0.2, don´t work with UCCX 10.5

    I have a Java Class (Compiled with JDK6_u12) that works with UCCX 9.0.2, after upgrade it don´t work with UCCX 10.5
    I get the error message: "Failed to access the WSDL at: https://www.brightnavigator.se/brightservice/brightservice.asmx?WSDL. It failed with: Got java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty while opening stream from https://www.brightnavigator.se/brightservice/brightservice.asmx?WSDL.; nested exception is: javax.xml.ws.WebServiceException: Failed to access the WSDL at: https://www.brightnavigator.se/brightservice/brightservice.asmx?WSDL. It failed with: Got java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty while opening stream from https://www.brightnavigator.se/brightservice/brightservice.asmx?WSDL. (line: 1, col: 47)
    Does anyone know about this ?

    Did you ever find a resolution to this issue? I have a similar issue after upgrading from 7 to 10.5. I have loaded all provided certificates to the tomcat-trust store, restarted Tomcat Services and still get the same error
    Thanks

  • Mapping editor not working with Java 5 classes

    I have a small protoype web service which I wrote using Tomcat/Axis/Spring/Hibernate and using EJB3 annotations for the mappings. I want to port the persistence layer to Toplink.
    I installed Toplink 9.0.4.1 and added the toplink libraries to my project and implemented the DAO and the spring bean defs.
    I opened the mapping editor and created a project. When I try to add classes to it for mapping I get an error that it can't find the classes (even though I selected them from the chooser). I figured it might be that they were compiled with Java 5, so I switched the JRE_HOME in setenv.cmd to my Java 5 JRE. Now I can import the classes and see the attributes but when I click on any of them in the Navigator panel, the editor panel remains blank. If I now try to save, I get:
    java.lang.NullPointerException
         at oracle.toplink.workbench.ui.tools.CheckListModel.getRowCount(CheckListModel.java:119)
         at javax.swing.JTable.checkLeadAnchor(JTable.java:2949)
         at javax.swing.JTable.tableChanged(JTable.java:2993)
         at javax.swing.JTable.setModel(JTable.java:2827)
         at oracle.toplink.workbench.ui.tools.CheckList.initialize(CheckList.java:47)
         at oracle.toplink.workbench.ui.tools.CheckList.<init>(CheckList.java:26)
    It seems that the mapping workbench doesnt work with Java 5. What should I do?

    Ah, I see. I saw another post here stating that must use 10.1.3.

  • Vrml browsers that work with sun java in windows

    Hi, i was wondering if anyone knew any good vrml browsers that worked with sun java in microsoft windows, I tried cortona but that only used microsoft's jvm which was discontinued and i wanted to avoid. I am currently trying to use cosmo player but am having troubles with it. Im specifically looking for good vrml api's that come with the browsers containing up to date available source code etc.
    Thanks
    Andy

    Is there noone on this site that uses VRML?

  • Applets not working with Java 1.7.0_51 in MII 14.0 SP4 Patch 5

    Hi,
    I'm currently evaluating the migration of our MII 12.0 developments to MII 14.
    But I'm running in several issues just trying to use simple things like a SQL query template with an iGrid Display template in test mode.
    Used versions are: MII 14.0 SP4 Patch 5 and on client side the latest Mozilla Firefox with Java 1.7.0_51
    At first I always get a java security warning when the applet is being loaded about unsigned applications.
    At second the applet itself is not running. It always shows "No data available" and the java console shows the following errors (iResult is the id of the applet):
    iResult [ERROR] - Couldn't set query template: No Query Defined
    iResult [ERROR] - Couldn't set display template: null
    iResult [ERROR] - Couldn't set display template: null
    Is this perhaps a general problem, that the MII applets are not working with Java 1.7.x versions?
    If I call the same MII page from a client with Java 1.6.x it is working without errors.
    Do you have some suggestions for me?
    Regards Timo

    please clear your JAVA Cache. that should solve the JRE issue. thanks

  • How i can start working with Java?

    Right now i am having only 8 months of exp in ABAP. can any one help me out to start working with Java specially for Netweaver Purpose

    It is great if you can get yourself familiar with java syntax, as is the case with any new langauage. However, the worst thing you can do is just code java in a top down approach. If you are not familiarizing yourself with OO concepts and best practices, then you are going to miss two important benefits that you will get from using OO programming - Reusability and flexibility in the frameworks that you develop (leveraging design patterns).
    These benefits will also be directly obtainable when you use ABAP objects.
    I am working in the opposite direction at the moment. I have some java experience, and I am starting to learn ABAP. I have used ABAP objects in my first project, and it was actually much better than I thought it would to be.
    Java and OO programming will be an ongoing learning experience. You will not be an expert for quite some time. I do not consider myself to be an expert by any means, and I've be studying OO and java for a few years.
    There is a fantastic book that explains OO concepts clearly, in much easier terms than the Gof "Design Patterns" book:
    Java Design: Objects, UML, and Process by Kirk Knoernschild
    You can read a few chapters at www.kirkk.com. (Use the JOUP link).
    Hope this helps you.
    - Brendan

  • Debugger that works with WebLogic 5.1?

    Are there any debuggers currently available that will work with WebLogic
    5.1?
    I assume that VisualCafe 4.0 (Expert Edition) will support local debugging,
    but I'm also interested in remote debugging which the Expert edition does
    not support.
    If not, does anyone know when VisualCafe Enterprise Edition 4.0 will ship?
    Thanks.
    Greg

    Hi!
    I have problem to get the co-client debug project to run. Do you have
    the same problem?
    -----Original Message-----
    From: Terry Potter [mailto:[email protected]]
    Posted At: måndag, augusti 07, 2000 23:18
    Posted To: tools
    Conversation: Debugger that works with WebLogic 5.1?
    Subject: Re: Debugger that works with WebLogic 5.1?
    I use the deistributed debugging that comes with Visual Cafe by Webgain
    v4.0. It works fine.
    "Jim Piersol" <[email protected]> wrote in message
    news:3989ccec$[email protected]..
    Get a real debugger. Try BugSeeker from http://www.karmira.com
    Jim Piersol
    Senior Software Engineer
    Sun Certified Java Programmer
    Strata Group, Inc.
    [email protected]
    "Greg Kim" <[email protected]> wrote in message
    news:8ibuit$35e$[email protected]..

  • Found x-platform remote debugger that works with WLSv4.5.1!!

    [att1.html]
              

    Hi!
    I have problem to get the co-client debug project to run. Do you have
    the same problem?
    -----Original Message-----
    From: Terry Potter [mailto:[email protected]]
    Posted At: måndag, augusti 07, 2000 23:18
    Posted To: tools
    Conversation: Debugger that works with WebLogic 5.1?
    Subject: Re: Debugger that works with WebLogic 5.1?
    I use the deistributed debugging that comes with Visual Cafe by Webgain
    v4.0. It works fine.
    "Jim Piersol" <[email protected]> wrote in message
    news:3989ccec$[email protected]..
    Get a real debugger. Try BugSeeker from http://www.karmira.com
    Jim Piersol
    Senior Software Engineer
    Sun Certified Java Programmer
    Strata Group, Inc.
    [email protected]
    "Greg Kim" <[email protected]> wrote in message
    news:8ibuit$35e$[email protected]..

  • SDM still not working with Java v6u15

    I keep waiting for Java to work some day with their updates on Cisco SDM. Update 14 at least allowed SDM to open. But the new update 15 still hasn't passed the test of clicking on the Configure button and then the Additional Task button. It just doesn't do anything. If it is something that Cisco can fix, please be aware.
    Thanks,
    .. Jim ..

    Hi Jim, you need to downgrade the JAVA version on the computer you want to use SDM.
    SDM does not support java after: 6u3.
    Cisco SDM requires Sun Java Runtime Environment (JRE). The following versions are supported:
    •JRE 1.5_09
    •JRE1.4.2_08
    •JRE 1.5.0_06
    •JRE 1.5.0_07
    •JRE 1.6.0_02
    •JRE 1.6.0_03
    As per the release notes.
    http://www.cisco.com/en/US/docs/routers/access/cisco_router_and_security_device_manager/software/release/notes/SDMr25.html
    This will resolve your issue.
    Cisco does not plan to fix this as SDM is end of life.
    The product that replaces SDM is CCP: Cisco Configuration Professional, that one works with JAva 6 update 14, but it's a different product. It's also a freeware you can download from our website.

  • Can "scrollmouses" work with java scrollbars

    Hi,
    These days many mouses have a third "button" (between the two usual buttons) for scrolling. So my question: Is it possible to get this scroll-button to work with java scrollbars?
    -Ohto

    I haven't done anything with it myself, but mouse wheel support was added in 1.4. Check out the java.awt.event.MouseWheelEvent class.

  • Who works with java?

    A friend of mine was telling me how just about every app the isp he works for is designing lately, they've been doing in java. Now this got me curious because I havent' seen much on java for the past year. I'm just curious, if you work with java, what kind of apps do you tend to create with it?

    Java is pretty much the top language for server side applications, I think because of its high quality threading (it can serve many clients easily). It also seems to be the language of choice for all business applications lately. But that's just because some idiots in a suit heard the name 'java' and decided it was cool, IMNSHO.
    You probably haven't heard much about it because a) Its not overly popular for desktop programs yet b) the apps that use it just use it without bragging about it and c) its not overly popular in open source. But it seems to be getting bigger.
    To answer your question about what kind of apps I personally create, check the signature.
    Dusty

  • Are there any standar iview that works with transaction Ad-hoc Query?

    Are there any standar iview that works with transaction Ad-hoc Query?
    So, I want the same iview for the various querys.
    Are there any iview how this?

    I am working with Portal and HR.
    Now, we are looking for to make a query, get the generated code, and insert it in a rfc. So, i could make a java web dynpro and call the rfc. But this is not the best solution.
    My question is about are there any standard iview for this scenario.
    Do you know?

  • What external drives work well with a late 2011 MacBook Pro?  I ask because I just found out the hard way that a Samsung EVO 840 does not.  Also should I avail myself of something that works with Thunderbolt or Firewire?

    What external drives work well with a late 2011 MacBook Pro (I7, Lion OS) apart from my Kingston flash and USB drive, and the SD drives that I use in my cameras and recording devices?  I ask because I just found out the hard way that a Samsung EVO 840 does not.  Also, should I avail myself of something that works with the Thunderbolt or Firewire connections?  I'm looking to back up music and video files created and/or processed in Logic Pro and the Adobe Production Premium software suite (Premier Pro, After Effects, Audition, etc).

    Hmm, not sure what problems you had installing this drive. The review here gives it good marks for Mac:
    http://www.amazon.com/Samsung-Electronics-EVO-Series-2-5-Inch-MZ-7TE1T0BW/produc t-reviews/B00E3W16OU
    There does seem to be a lot of prep to make it work:
    "1. Preparation to install your new shiny SSD
    1.a You will need a migration tool (I used the Sabrent kit USB 3.0 to Sata that was suggested in these review) see link http://www.amazon.com/gp/product/B00DQJME7Y/ref=oh_details_o03_s01_i01?ie=UTF8&p sc=1
    1.b You will need to download a trim enabler (mid 2012 macbooks only support native trim with apple brand ssd's) I recommend going to cindori.org and downloading trim enabler version 3.xx. You can do this step before or after the OS migration
    1.c You cannot use the Samsung SSD migration software *don't worry Mac has its own imaging/migration utility*"
    Also in those reviews:
    " Only down side when using this product in a Mac Mini is you will be required to download and install Trim Enabler so that your drive performs optimally on your Mac device. This is an Apple issue, not Samsung, but it is an extra step you will have to take after you install the hard drive, and any time you perform an OS upgrade." He rant's on.
    Personally I only deal with OWC:
    http://eshop.macsales.com/shop/SSD/OWC/
    They are very knowledgable and if there's a problem they will gladly take back the item. (Never happened to me yet - 8 years and counting).
    Just upgraded my 13" MBP 2011 to 120 GB for $79. Adobe CS 6 opens in 3 seconds! Awesome!
    When I was in Chicago I had a pro photographer for a client. She wound up with 4 internal drives in her Pro, 4 external drives and an dual array locked in a steel vault in the basement. All from OWC. OK she was a bit paranoid. Great client though.
    As far as value for price:
    http://eshop.macsales.com/item/OWC/MES3FH7500G/
    500 GB for $130.
    However as far as reliability is concerned:
    http://www.rockpapershotgun.com/2014/01/30/are-ssds-reliable/
    http://www.extremetech.com/computing/173887-ssd-stress-testing-finds-intel-might -be-the-only-reliable-drive-manufacturer
    So sudden power loss is an issue with SSDs.
    Personally I'd go with a moderate sized SSD internally and a conventional external for backup. An array would be the most reliable.

  • How can I make an icon that links to a webpage that works with Mac and Windows??

    Hi!
    I burn CDs with my photos and send them to clients.   Besides the photos folder, I would like to include a file (similar to the .webloc files on the Mac Desktop) that can be clicked and it will be linked to my website - it will open up a browser window and go to my website .      Is it posssible to make one of these icons that works with both Macs and Windows machines?  Thanks!

    Now it works!  Thanks, Denico!
    The reason I saved to text:   The first time I followed your instructions, it did not work.   I tried to figure out what I did wrong and saw that you wrote to "save as plain text."   I did not know what this means and there was no option available to save a plain text.  So I looked around and saw "save as stationery" and I guessed that maybe that was what you meant.   And after that, it worked!  But the next thing you know, the icons started duplicating themselves.
    I guess I had made a different mistake in the beginning and I fixed it without knowing what it is.
    Thanks for clearing that up.
    But just one question.  WHY does saving as "stationery" make an icon duplicate itself?

  • A UPS model that works with Mac Native software to do a graceful shutdown and automatic restart during a power failure.

    I've tried 3 UPS's (2 APC and one TripLite) that state they are OSX compatible, however, they do not fully respond to the native osx setting in (system Preferences/ Energy Saver/ UPS/Start up automatically after a power failure). This is what happens:
    During a power outage, the OS does a graceful shutdown, but does not reboot when power is restored. 
    Apparently, the UPS is not notified to turn off during the shut down process. The power (on-Off-On) cycle is required by the mac to restart.
    Trip lite tech support says they have software that works with Windows and linux to do this, but not mac.
    I've tried two older APC UPS's, One Smart UPS1500 and a Back-UPS 1500 with the same result on two different servers and one iMac.
    At this point I'm looking for a make and model of a UPS that does work. If anyone can verify a make and model that actually does this, I'd greatly appreciate it.
    Its a simple test, just pull the plug on your UPS, wait for the system to shut down, and then plug the UPS back in. The system should reboot.

    Many of the CyberPower UPS units are compatible. Checkout the home solutions on this page: http://www.cyberpowersystems.com/products/ups-systems.html

Maybe you are looking for

  • Shipping Options Lock iPad web browser

    I am not sure how many of you have noticed it but when you have shipping options in your Shopping cart, after you slect one, you receive a confirmation box where you have to click on OK. Whan this box appears on iPad (I tested on iPad3 with the lates

  • How to handle message prioritization in interface determination

    Hi Experts, How to handle the prioritization of messages if we say that for single source message it will be forwarded to 2 types of target messages. Here's the scenario: InterfaceDetermination object SourceMessageA => TargetMessageTypeA SourceMessag

  • HDD LED doesn't work with SATA?

    I just built this system last week and installed a Maxtor 160GB SATA drive and the led on the case doesn't light up when the HDD is in use. Is this a board problem or SATA problem?

  • Losing database connections in remote objects

    Hi, I have an interesting problem. I have a couple of remote objects that bear database connections. They are pooled in another remote object and provided by registry on request to the client. However, when I check the connections after a while, all

  • Could someone advise me on a fix for my compiler

    I have Xcode installed with both gcc-3.3 and gcc-4.0.1... BUT... i think that there is another version (gcc-4.1.1) floating around that I must have inadvertantly (or advertantly, but long enough ago that I don't remember doing it) installed through w