DEV Community

V I N O T H
V I N O T H

Posted on

1

DAY 9 Task

  1. Create a class 'Employee'
  2. Have main method in it.
  3. Inside main method, create an object.
  4. Using this object, call method called 'develop'.
  5. using this object, call method called 'work(10)'
  6. Define appropriate methods develop() and work(int no)
  7. From work method, return no * 10
  8. Store the returned value as 'output' in main method.
  9. Print the 'output'.

Program:

Image description

Output:

Image description

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs