Write a program in java to a class called Employee which
is
having the following instance variables.
name(string type)
age(int type)
designation(string type)
salary(double type)
The class Employee must have a parameterized constructor
having
only name as the argument and initializes the name variable.
Proceed with same class....
write a method called empAge to change the state of age
variable after passing an integer value.
write a method called empDesignation to change the state of
variable designation after passing a string.
write a method called empSalary to change the state of
salary
variable after passing a double type value.
After writing the main method create an instance of the
class
Employee and enter the following details and check your
construction by printing it.
said
21
programmer
800.0
hassin 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
hassin 0 Newbie Poster
hassin 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
hassin 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
hassin 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
hassin 0 Newbie Poster
hassin 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.