• Post Reply Bookmark Topic Watch Topic
  • New Topic

help please  RSS feed

 
Curtis Bridges
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
--------------------------------------------------------------------------------

Hello,
I am once again askng for help. This is a homework assignment I am having rouble getting to compile. I keep getting this message "'{' expected" for line 13. As you can see there is an opening brace there. If I remove the brace and I get this message "'class' or 'interface' expected" for lines 21, 71, 74.
If someone could take a peek at it would be appreciated. I have included my code along with the instructions, and have marked the suspect code with .javascript: x()
censored Thank you.

Write a class named Employee that has the following fields:
* name. The name field is a ser�ng object that holds the employee's name.
* idlumber. The idRumber is an int variable that holds the employee's ID number. � department. The department field is a str�ng object that holds the name of the department where the employee works.
� position. The position field is a str�ng object that holds the employee's job title.
Write appropriate mutator methods that store values in these fields and accessor methods that return the values in these fields. Once you have the written the class, write a separate program that creates three Employee objects to hold the following data.
Name ID Number Department Position Susan Meyers 47899 Accounting Vice President Mark Jones 39119 IT Programmer Joy Rogers 81774 Manufacturing Engineer
The program should store this data in the three objects and then display the data for each employee on the screen.
*/


 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is
public class Employee(){
are you trying to declare a second class, or should this be a method/constructor?
 
Curtis Bridges
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was supposd to be a construcor. hanks for taking the time to look at it.
Curt
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!