

Using Classes
Flashcard
•
Computers
•
12th Grade
•
Practice Problem
•
Easy
Jeffrey Smith
Used 1+ times
FREE Resource
Student preview

9 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Shoes shoe1 = new Shoes();
Back
public Shoes(){
brand = "Nike"
size = 7;
}
2.
FLASHCARD QUESTION
Front
Shoes shoe2 = new Shoes("Adidas");
Back
public Shoes(String brand){
this.brand = brand;
size = 7;
}
3.
FLASHCARD QUESTION
Front
Shoes shoe1 = new Shoes(){
System.out.println(shoe1);
Ouput: Brand: Nike Size: 7
Back
public String toString(){
return "Brand: " + brand + " Size: " + size;
}
4.
FLASHCARD QUESTION
Front
System.out.println(shoes1.getBrand());
Back
public String getBrand(){
return name;
}
5.
FLASHCARD QUESTION
Front
shoes1.setSize(10);
Back
public void setSize(int size){
this.size = size;
}
6.
FLASHCARD QUESTION
Front
shoes1.setBrand("Puma");
Back
public void setBrand(String brand){
this.brand = brand;
}
7.
FLASHCARD QUESTION
Front
System.out.println(shoes1.getSize());
Back
public int getSize(){
return size;
}
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?