473,651 Members | 2,775 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

5 New Member
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, 432 views)
Dec 8 '10 #1
3 3507
miss peaches
5 New Member
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
Sean Pedersen
30 New Member
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
miss peaches
5 New Member
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
2235
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 an array of pointer to Attore. I have written these overload in these ways. the overload of << work correctly the overload of >> I don't know. I compile the class correctly, when I insert a film through the operator >> I don't receive error, but...
4
2747
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 { ... }; idiom (don't know the name of it, if there is one). The problem is that I don't want any of my classes to have public constructors. They should be created by a static member function. This is what I want to do, save for the fact that this...
19
6136
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 found anything). Here's the problem, I have two sets of files, the name of a file contains a number which is unique for each set but it's possible (even probable) that two files in different sets have the same numbers. I want to store these...
1
3718
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) class library and type in the following code below: #include <map> #include<string>
20
4632
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 out of a wet paper bag in a few languages, but want to by-pass some of the learning curve for this project.
4
5072
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() { return 0;
2
3514
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 -- <html> <head> <title>
3
2544
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 = "System.EventArgs"} : {Name = "EventArgs" FullName = "System.EventArgs"} base {System.Reflection.MemberInfo}: {Name = "EventArgs" FullName = "System.EventArgs"}
5
1663
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 name="MiddleInitial" defaultValue="" type="string" /> <add name="LastName" defaultValue="" type="string"/> <add name="Address1" defaultValue="" type="string"/> <add name="Address2" defaultValue="" type="string"/> <add name="City" defaultValue=""...
4
7891
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 both the Project2.java and HouseGUI.java Here are the requirements for those two. The GUI Create a class called HouseGUI which extends JFrame. It should display two text areas (JTextArea) in a grid layout (1 row, 2 columns). Your main program,...
0
8277
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8803
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8700
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8581
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.