Posted by: Ayus April 12, 2011
C++ Desperately need help!!!
Login in to Rate this Post:     0       ?        
this is in java,
// a bit left...complete by urself

package demo.test;

public class NumDays {
    private int days;
    public NumDays(int hours){
        if(hours <=8){
         days=(hours-(hours-1));
         days = hours; 
        }  
    }
    public int getWork_hours() {
        return days;
    }
 }

//test class
package demo.test;

public class TestNumDays {
  public static void main(String[]args){
      NumDays nd = new NumDays(8);
      System.out.println("No of Days:\t"+nd.getWork_hours());
  }
}
Read Full Discussion Thread for this article