/*
The following class gives us an overview of the
development strategy of Nepal where development is
initiated in a method that is void, yet a return type
is expected.
*/
public class NEPAL
{
private Development<Progress> development = new Development<Progress>();
//Creating Develeopment to hold lists of Progress
int progressID;
/*
The following method takes 4 parameters of described type
the for loop is placed so that the value of Resources can be generated until its value is equal to that of politicianAndRelatedObjects
the if loop runs only when the above for loop runs with 100% success
if not the else statement will return the development value (initially set as null).
*/
public void developmentStrategy(Resourses money, ManPower ordinaryNepali,
Profit politicianAndRelatedObjects, Profit nationalTreasure)
{
development = null;
progressID = development.get(0);
//any project will not initiate unless politicianAndRelatedObjects sees enough Resource
if (money.equals(politicianAndRelatedObjects))
{
/*
This loop will execute only when ordinaryNepali are fully asleep
and will assign all given Resources to the politicianAndRelatedObjects
setting no physical progress of development
*/
while(ordinaryNepali.equalsAsleep())
{
money.assigTO(politicianAndRelatedObjects);
progressID++;
development.add(new Progress(progressID, "Tea Parties organized with huge success"));
return development;
}
/*
This loop will execute only when ordinaryNepali are half awake
and will assign some half Resources to the nationalTreasure and remaining half to politicianAndRelatedObjects
setting hopes of progress of development
*/
while(ordinaryNepali.equalsHalfAwake())
{
money.assigTO(nationalTreasure, politicianAndRelatedObjects);
development.add(new Progress("The Council Members agrees on a decision"));
return development;
}
/*
This loop will execute only when ordinaryNepali are half awake
and will assign some half Resources to the nationalTreasure and remaining half to ordinaryNepali
setting slight physical progress in development
*/
while(ordinaryNepali.equalsFullyAwake())
{
money.assigTO(nationalTreasure, ordinaryNepali);
progressID++;
development.add(new Progress(progressID, "Work initiated until this.ordinaryNepali.equalsAsleep()"));
return development;
}
}
else
{
return development;
}
}
}
No comments:
Post a Comment