Polymorphysm
every Human in this world can eat and sleep
how to eat, can't be sure, depends on what kind of human that is
how to sleep, no matter which nation you are, you sleep in the same way,which is "it's dark, switch off the light, time to sleep"
there are a lot of Blievers in this world, they can pray
how to pray, can't be sure, depends on what kind of believer that is
there are a lot of DevelopingCountryPeople in this world, they workHard,
but workHard how, can't be sure, depends on what kind of DevelopingCountryPeople that is
there are Chinese ,American,Indian in this world
they are all Human, Chinese eat like "we eat with chopsticks",American eat like "we like pizza", Indian eat like "curry is the best"
American、Indian are Believer, American pray like "Amen", Indian pray like "Namaste"
(sorry I don't know much about religion, please change them as the correct thing)
Chinese、Indian are DevelopingCountryPeople, Chinese workHard like "996",Indian workHard like "007"
(996、007 are jokes online, 996 means work from 9am to 9pm every day and 6 days a week, 007 means 24hours*7 a week)
there is a company, 3 things will happen here
1.party. as long as this employee is human, then he can join, the process is
"party time"->eat->"let's go back"->sleep
2.have religion vacation. only believers can have vacation,the process is
"as long as you have believe, you can take this vacation"->pray
3.hiring people. only hires developing country people, the process is
"why should we hire you?"->workhard
(reminder: everything in "" is for print)
create a Main class, in main method create instances of Company,Chinese,American,Indian
call all the methods of company, see how many ways we can call them

浙公网安备 33010602011771号