Builder

Report a typo

GeekDirector must provide the following geeks :

  • Admin with 10 years of experience and knowledge of PowerShell and Perl;

  • Backend with 5 years of experience and knowledge of Python and PHP;

  • Rockstar with 20 years of experience and knowledge of Java, Kotlin, Scala languages and Angular framework.

The first line of standard input is the geek's name. The second is the type of geek.

You must write the missing methods in GeekDirector class to output the correct geek.

Please do not change the provided code of the classes.

Sample Input 1:

Garry
Rockstar

Sample Output 1:

Geek Garry created.
Type : Rockstar
Languages : [Java, Kotlin, Scala, Angular]
Experience : 20 years
Write a program in Java 17
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
* ConcreteComponent - Geek.
**/
class Geek {

private String type;
private List<String> languages;
private int experience;

public Geek(String type, List<String> languages, int experience) {
this.type = type;
this.languages = languages;
this.experience = experience;
}

@Override
public String toString() {
return "Type : " + type + "\n" +
"Languages : " + languages + "\n" +
"Experience : " + experience + " years";
}

}

/**
* Builder interface describe step of object creation.
**/
interface Builder {
void setType(String type);

void setLanguages(List<String> languages);

void setExperience(int experience);
___

Create a free account to access the full topic