Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define a class named Employee with following characteristics: Data members int employeeId String employeeName String designation int salary Methods void getEmployee() - Accepts console input

Define a class named Employee with following characteristics:

  • Data members
    • int employeeId
    • String employeeName
    • String designation
    • int salary
  • Methods
    • void getEmployee() - Accepts console input for employeeId, employeeName, designation, and salary.
    • void showGrade() - Displays grade of an employee based on criteria specified below.
    • Void ShowEmployee() - Displays employee details.

Salary Grade 0 to 20000 D 20001 to 50000 C 50001 to 100000 B 100001 and above A

Input 1 Codezinger Software Developer 800000 where,

  • First line represents employee ID.
  • Second line represents employee's name.
  • Third line represents employee's designation.
  • Fourth line represents employee's salary.

Output Employee grade is: A Grade Employee details are: Employee ID=1 Employee Name=Codezinger Designation=Software Developer Salary=800000

where,

  • Display grade with Grade appended to it.
  • Employee details are separated by a new line.
  • No new line should be present after salary.

(Use Java to work on this question).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Is conflict inevitable in organizations? Why?

Answered: 1 week ago