473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Java/NetBeans trouble. <No main class found> when attempted to run

I am currently enrolled in a Java Programming Class in which we were asked to create a Class to store and retrieve an employee's name, hourly rate, and hours worked. Use constructors to initialize employee info and a method within the Class to calculate weekly pay. Once "Stop" is entered as employee name, the application should terminate. I have attached for you the code I wrote. Let me know if you need any additional info from me. Thanks for your time.

Also, here are the instructor comments for me:
Your code compiled without any error.
-Your code did not run due to main class missing.
-Your code did not make use of constructor to initialize the employee
information.
-You did a good job in writing the employee class, but you did not use it in
your code.

*Thought I did create a main class and used constructors. Please help
Attached Files
File Type: txt Payroll Project 3.txt (3.3 KB, 429 views)
Dec 8 '10 #1

✓ answered by Sean Pedersen

Expand|Select|Wrap|Line Numbers
  1. public static void main( String args[], double hourlyRate, double hoursWorked,
  2.  
  3.             double payAmount)
should be
Expand|Select|Wrap|Line Numbers
  1. public static void main(String[] args)

3 3495
Come on someone!! Out of 426 views, can someone PLEASE look at my code and help me figure out where I went wrong!
Dec 9 '10 #2
Expand|Select|Wrap|Line Numbers
  1. public static void main( String args[], double hourlyRate, double hoursWorked,
  2.  
  3.             double payAmount)
should be
Expand|Select|Wrap|Line Numbers
  1. public static void main(String[] args)
Dec 10 '10 #3
Thanks I'll try that and see, but what about the use of constrictors? Did I use those or not?
Dec 10 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Piotre Ugrumov | last post by:
I have done the overload on the operator >> and << in the class Attore. These 2 overload work correctly. I have done the overload of the same overload in the class Film. The class film ha inside...
4
by: Grey Plastic | last post by:
I have several classes that all keep track of static data. However, the manner that they keep track of static data is identical, and so I'm using the template<class Child> class Parent { ... };...
19
by: Erik Wikström | last post by:
First of all, forgive me if this is the wrong place to ask this question, if it's a stupid question (it's my second week with C++), or if this is answered some place else (I've searched but not...
1
by: Maxwell | last post by:
Hello, I having having oodles of trouble using the std lib in my MC++ (VS.NET 2003) Class library. I figured out a simple sample to reproduce the errors I am having. Create a MC++ (VS.NET 2003)...
20
by: Bill DeWitt | last post by:
I downloaded the Sun product, and find it feature rich but slow. Can someone recommend a more basic (freeware) IDE which will help a newbie without hiding every bit of code? I can program my way...
4
by: Gary li | last post by:
Hi, all I find "template template" class cann't been compiled in VC6 but can ok in Redhat9. I write a test program like as: template< template<class> class T> class A { }; int main() {...
2
by: Andrew Neiderer | last post by:
This is simple HTML, Java but I am really confused. I include the code since it is so small - ---------------------------------------------------------------------------- -- test.html -- ...
3
by: my cats, Gag and yak | last post by:
the following keeps showing up in Application_Error I have re-installed VS2008 and it still happens I do not know what this means, thank you your help. {Name = "EventArgs" FullName =...
5
by: Steven | last post by:
I have the following in my web.config: <system.web> <profile defaultProvider="MyASPSqlProfileProvider" enabled="true" > <properties> <add name="FirstName" defaultValue="" type="string"/> <add...
4
by: lilyumestar | last post by:
I have project I have to do for class. We have to write 4 different .java files. Project2.java HouseGUI.java House.java HouseSorting.java I already finish House.java and I need to work on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.