I wrote a Java program that help breast feeding mother to organize their pump out milk and optimized the storage to ensure baby to best fresh milk to drink.
Non programming background people are able to read and understand this program.
For programmer , plave help me to complete the unfinished part and debug it.
Thanks
//it is matrix ; the milk producer
public class mother extends earth.livingcreature.human{
private double energy ;
// internal energy of mother , it will convert to milk
public double milk_produce_happy_level=32 ;
//in oz mother will feel happy if she pump out 32 oz a day
protected milk pumping(){};
//an exhaust function call for mother ,she pumping milk herself , should be protected function , only the person close to her allow stay inside the room while pumping
private energy eating(){};
// an energy input function
private energy transfer() ;
//and energy transfer function , it convert energy to milk;
}
public class Baby externed earth.livingcreature.human{
//it is a milk consumer
private double weight, length, head_circumference ;
// main index to measure a baby development
private milk_consuming_per_day=25 oz
// father and mother will feel happy if baby drink above this level
public Poopoo poo_poo(){};
// he do it very public , best time is changing diaper!
public Emergy drink(Milk milk){};
// a drink milk function ,and generate poo poo object
public Happy play(){};
//this function will generated baby sound such as "gue,ong-gu.." and a wonderful smile...., oh how come this class more like my tamaguchi program that wrote in year 1
private sleep() ; //lucas so seldom to call this function...
}
public class Milk extends earth.liningcreature.human.monther{
//it is the sub class of mother , cos mother generated fresh milk
/* below parameter as best for immune level in a milk*/
int frozen_max_allow=2 month's;
/* standard is 3 month at 0 degree*/;
int refrigerated _max_allow=48 hrs;
/* standard is 72 hr*/
int immune_degree
/* it is only provided from breast milk, it will lose 30-40% during frozen and thawed process, and decrease as time pass so we should try to give fresh milk to baby asap after
mother.pump() ,and freeze as an option while have extra milk. However frozen milk is still provide more 60% immune than formula milk
*/
int cool_min_storage= 30oz;
/*oz baby will consume around 25 oz per day, you keep extra 5 refrigerated milk;
}
public refrigerator(){
int current_storage ;/* current storage in lower part of refrigerator*/
int frozen _storage; /* current freezed milk storage, it help mother to finished the bumping more early*/
public static keep(Milk milk){
//it is a very complicate algorithm to optimize the storage fresh milk
if(current_storage>Milk.cool_min_storage){
frozen (milk);
}else {
refrigerate(milk);
}
}
public static Milk take(){
Milk milk=take_earest_milk();
while(milk.isExipred()){
milk.dump();
//What a pity function call , but we should call it to ensure baby have good quality milk
milk=take_earest_milk();
// ok it is a recursive function call, until we get a good non-expire milk in our standard
}
if(current_storage<Milk.cool_min_storage){
thawed(Milk milk);
/*thawed a frozen milk from the frozen storage to current_storage ensure have enough milk provide;
}
return(milk);
}
}









