Question: Why when i run this jaava code i get no ouitput i tried using the terminal method but no luck- can you show me how

Why when i run this jaava code i get no ouitput i tried using the terminal method but no luck- can you show me how to make it work properly it compiles ok but nothing pops up please fix

public class AssignPlan {

public static void main(String[] args) {

// TODO Auto-generated method stub

}

//decalre the private variables

private String highPriorityItem="";

private int numAssignment,numComplete,hoursAvailable;

private double totalPoints;

//accessor for the private variables

private String gethighPriorityItem()

{

return highPriorityItem;

}

public int getnumAssignment()

{

return this.numAssignment;

}

public int getnumComplete()

{

return this.numComplete;

}

public int gethoursAvailable()

{

return this.hoursAvailable;

}

public double gettotalPoints()

{

return this.totalPoints;

}

//ToString method for the display ouput

public String toString()

{

return"====================== "+

"-----TODAY'S PLAN----- "+

"---------------------- "+

"Priority:"+gethighPriorityItem()+" "+

"Assignments:"+getnumAssignment()+" "+

"Completed:"+getnumComplete()+" "+

"Hours Avail:"+gethoursAvailable()+" "+

"Tot. Points:"+gettotalPoints()+" ";

}

//constructors

public AssignPlan()

{

}

public AssignPlan(int numAssigns)

{

numAssignment=numAssigns;

}

//contructor

public AssignPlan(String highPriorityItem,int numAssigns,int numComplete,int hoursAvailable,double totalPoints)

{

this.highPriorityItem=highPriorityItem;

this.numAssignment=numAssigns;

this.numComplete=numComplete;

this.hoursAvailable=hoursAvailable;

this.totalPoints=totalPoints;

}

//set the priority value

public void setPriorityTo(String aname)

{

this.highPriorityItem=aname;

}

//method of the handle Assignmet

public void handleUrgentAssignment(String name,int efforts,int resources, int difficulty)

{

Assignment newAssignment=new Assignment(name,efforts,resources,difficulty);

this.highPriorityItem=name;

this.numAssignment=this.numAssignment+1;

this.numComplete=this.numComplete+1;

this.hoursAvailable=this.hoursAvailable-efforts;

this. totalPoints=this.totalPoints+newAssignment.getScore();

}

}

class Assignment

{

private String name;

private int efforts;

private int numResources;

private int estDifficulty;

private double estScore;

//constructor

public Assignment(String name,int efforts,int numResources,int estDifficulty)

{

this.name=name;

this.efforts=efforts;

this.numResources=numResources;

this.estDifficulty=estDifficulty;

this.estScore=0.1*(this.efforts*estDifficulty+Math.pow(numResources * efforts,2) / (Math.PI *Math.sqrt(estDifficulty)));

}

//accessor methods of private variable

public String getName()

{

return name;

}

public int getEfforts()

{

return efforts;

}

public int getResources()

{

return numResources;

}

public int getDifficulty()

{

return estDifficulty;

}

public double getScore()

{

return Math.round (estScore*10.0)/10.0;

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!