Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

neep help  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question"
determine the gross pay for each of three employee. the company pays "stright-time" for the first 40 hrs worked by each employee and pays "time-and-a-half" for all hours worked in excess of 40
hours.
employee Hours Hourly
Joe 39 12
Jane 40 35
Paula 45 45
should pass in one set of hours worked and the hourly rate, as command line parameters, then calculate the gross pay...
example
java Project1. 40 10
will produce the output: 400
 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what's the question? Interesting assignment from Comp Sci 101!
 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe I could help but this sounds like homework. If you need help understanding something I'll help but this isn't the right place for others to do your homework for you.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neema,
If the question is "where do I start" then this is the basic structure of a java application:
Create a file named Pay.java that sits in the directory that you have your Path and Classpath pointed to.
In the file create a class

compile the code by typing at the prompt
>javac Pay.java
run the code by typing
>java Pay Joe 39 12
etc.
 
Can you really tell me that we aren't dealing with suspicious baked goods? And then there is this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!