Intrebari de interviu la Google,Microsoft si Ikea
Posted In:
IT general
.
By Monica
Via Eduard, am descoperit aceste intrebari de interviu de la Google, Microsoft si IKEA :).
O lectura instructiva si interesanta; pe mine ma fascineaza momentan intrebarea 5 de la Google
Describe a chicken using a programming language.
Cand ajung la o concluzie mai avasata decat "Chicken is a Bird has 2 legs and 2 wings", o transcriu in javascript si o postez :)
3 Responses to Intrebari de interviu la Google,Microsoft si Ikea
Ce zoco de asta ????
abstract class Animal{
private String type;
private int age;
private int height;
private int weight;
private int nrLegs;
private eat();
private moveAround();
private talk();
public String getType(){
return type;}
public void setType(String type){
this.type=type;
}
public int getAge(){
return age;}
public void setAge(int age){
this.age=age;
}
public int getHeight(){
return height;}
public void setHeight(int height){
this.height=height;
}
public int getWeight(){
return weight;}
public void setWeight(int weight){
this.weight=weight;
}
public int getNrLegs(){
return nrLegs;}
public void setNrLegs(int nrLegs){
this.nrLegs=nrLegs;
}
}
class Chiken extends Animal{
public Chicken(){
this.age=0;
this.height=5;
this.weight=50;
this.nrLegs=2;
public layEggs(){
}
public eat(){
}
public move(){
//slowly
}
public talk(){
System.out.println("Cock-A-Doodle-Dooooo");
}
}
"Ce zici de asta" era prima linie.
:) nice dar eu cred ca as fi facut o clasa Bird care sa fie un Animal cu 2 picioare care lays Eggs.
Something to say?