Career

Report a typo

There are three classes: an abstract class Career, and two concrete classes, Engineer and DataScientist.
Your task is to implement the abstract class Career with a template method called execute() and an abstract method called work() using the following algorithm:

  1. Dream
  2. Plan
  3. Study
  4. Work

Make the classes Engineer and DataScientist inherit from the Career class and implement the methods according to the console output.

Sample Input 1:

engineer

Sample Output 1:

Dream big!
Draw a plan!
Study!
Work as a Full Stack Engineer

Sample Input 2:

scientist

Sample Output 2:

Dream big!
Draw a plan!
Study!
Work as a Data Scientist
Write a program in Java 17
import java.util.Scanner;

abstract class Career {

public void execute() {
// write your code here ...
}

// write your code here ...

// Do not change the code below
public void dream() {
System.out.println("Dream big!");
}

public void plan() {
System.out.println("Draw a plan!");
}

public void study() {
System.out.println("Study!");
}
}

class Engineer {
// write your code here ...
}

class DataScientist {
// write your code here ...
}

// Do not change the code below
class Main {
public static void main(String[] args) {
final Scanner scanner = new Scanner(System.in);
___

Create a free account to access the full topic