Resolved how do i do this?

Rafael Vinicius

the crucified
Joined
Mar 11, 2021
Messages
3
Programming Experience
Beginner
1 - In order to represent employees in a company, create a class called Employee that includes the following three information as attributes:
a first name,
a surname, and
a monthly salary.
all attributes must be public at this point.
2 - Create a constructor that initializes all the attributes of the class.
3 - Create a method that allows the Employee's first and last name to be returned together.
4 - Create a method that returns the Employee's salary.
5 - Create a method that allows a 10% increase over the Employee's salary.
6 - In the Program class of your project, create an instance of the Employee class.
7 - Print the name and surname of the employee created using the method you created.
8 - Invoke the method that increases the employee's salary.
9 - Print the employee's new salary using the method that returns the employee's salary.
 
You would follow the steps incrementally. Do step 1 first. Make sure that it builds and runs. Then do step 2. Make sure that it builds and runs. Then do step 3. Lather. Rinse. Repeat.

We are a not a code writing service. If you show us what you've got and tell us what problems you are running into, we can guide you along the way. We won't do your homework for you, though.
 
1 - In order to represent employees in a company, create a class called Employee that includes the following three information as attributes:
a first name,
a surname, and
a monthly salary.
all attributes must be public at this point.
Are you really saying that you don't know how to define a class? If you can do that, why are you asking us how to do it? If you can't do it, why aren't you going back over the notes/text for your class where you were taught it and learning how? As suggested above, you need to do what you can for yourself and then ask us a SPECIFIC question about an SPECIFIC issue that you encounter along the way. Expecting us to teach you everything you need because you didn't listen in class or couldn't be bothered reviewing what you've learned is not on. We're here because we want to help but that doesn't mean that we're happy to be taken advantage of. If you're willing to put in the effort, we're willing to put in the effort to help with the bits you can't do yourself. If you're not going to make any effort on your own behalf, why would we want to?
 
Are you really saying that you don't know how to define a class? If you can do that, why are you asking us how to do it? If you can't do it, why aren't you going back over the notes/text for your class where you were taught it and learning how? As suggested above, you need to do what you can for yourself and then ask us a SPECIFIC question about an SPECIFIC issue that you encounter along the way. Expecting us to teach you everything you need because you didn't listen in class or couldn't be bothered reviewing what you've learned is not on. We're here because we want to help but that doesn't mean that we're happy to be taken advantage of. If you're willing to put in the effort, we're willing to put in the effort to help with the bits you can't do yourself. If you're not going to make any effort on your own behalf, why would we want to?
ok sorry, I'm progressing alone.
see you later.
 
You would follow the steps incrementally. Do step 1 first. Make sure that it builds and runs. Then do step 2. Make sure that it builds and runs. Then do step 3. Lather. Rinse. Repeat.

We are a not a code writing service. If you show us what you've got and tell us what problems you are running into, we can guide you along the way. We won't do your homework for you, though.
it helped me thanks.
 
Back
Top Bottom