/** * This program only apply to the girl that I loved and the girl that loved me. * (or in the future) :P * @authur Dexter Lei * * sample run : new MyFeeling("your name", 1 or 0); * 1: happy * 0: sad */ public class MyFeeling{ private String me = ""; private String others = " you "; public MyFeeling( String name, int feeling){ if(feeling == 1){ setHappyness(name); } else { setSadness(name); } } public void setHappiness( String name ){ me= "Dear " + name + ":\n When" + others + "smiled at me with that playful smile," + "\n" + "my heart suddenly filled with love and happiness." + "\n" + "and I became the richest man in the world," + "\n" + "wishing the moment could last forever."; } public void setSadness( String name ){ me= "Dear " + name + ":\n When" + others + "are away, I missed" + others + "dearly," + "\n" + "wondering is you are still doing well" + "\n" + "and my lonely heart drank dry the river of sorrow," + "\n" + "longing for your company."; } public String toString(){ return me; } }
No comments:
Post a Comment