DreamTek Company Program in java

In this post, we will learn DreamTek Company Program in java Programming language.


DreamTek Company provides an initial training for all its employees, once they join the company. During the training phase they call the employees as “Associate”. The initial training is conducted for 60 days for each Associate. In these 60 days they learn various technologies. The first 20 days they learn “Core skills”, the next 20 days they learn “Advanced modules” and the final 20 days they go to the “Project phase”.  Help the DreamTek Company to find in which phase the associates are in.

Consider the below class:


In the Associate class include the given attributes and methods with the access specifiers as specified in the class diagram.

The setter methods are used to set the value and the getter methods are used to retrieve the value.

The trackAssociateStatus method takes the number of days as argument and sets the work status of the associate based on the number of days. If the number of days is greater than 60 days then set the work status as “Deployed in project”.

 In the Main class, create an object for the Associate class; Get the details as shown in the sample input and assign the value for its attributes using the setters. Invoke the trackAssociateStatus method and find the work status and display the details as shown in the sample output.

Sample Input1:

Enter the associate id:


Enter the associate name:


Enter the number of days:


 Sample Output 1:

The associate john work status:Project phase

 Sample Input 2:

Enter the associate id:


Enter the associate name:


Enter the number of days:


 Sample Output 2:

The associate ram work status:Deployed in project


import java.util.Scanner;
public class Main{
    public static void main (String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("Enter the associate id:");
        int ass_Id=sc.nextInt();
        System.out.println("Enter the associate name:");
        String name=sc.nextLine();
        System.out.println("Enter the number of days:");
        int days=sc.nextInt();
        Associate obj=new Associate();
        System.out.println("The associate "+obj.getAssociateName()+" work status:"+obj.getWorkStatus());
public class Associate{
    private int associateId;
    private String associateName;
    private String workStatus;
    public int getAssociateId()
        return this.associateId;
    public void setAssociateId(int associateId)
    public String getAssociateName()
        return this.associateName;
    public void setAssociateName(String associateName)
    public String getWorkStatus()
        return this.workStatus;
    public void setWorkStatus(String workStatus)
    public void trackAssociateStatus(int days)
            this.setWorkStatus("Core skills");
        else if(days>=21 && days<=40)
            this.setWorkStatus("Advanced modules");
        else if(days>=41 && days<=60)
            this.setWorkStatus("Project phase");
            this.setWorkStatus("Deployed in project");
  1. ZeeZee bank
  2. Book Detail
  3. Ticket Price Calculate – Static
  4. Student Details – Constructor
Sharing Is Caring:

Leave a Comment

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock