Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class declaration

Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody help me with this one.
Which variables should you use to declare the class Hexagon. Hexagon is drawable and it has several vertices, Colors that can be stored by a Vector and a flag of boolean type. What can you use to declare the member variables of this class?
A. Object
B. boolean
C. Vertice
D. Vector
E. Hexagon
Since none of the modifiers are we assume that we have to specify the modifier(public) as a part of declaration?
Should it be
public class Hexagon extends drawable(vertice integer, flag boolean, color vector){}
Now, 1. I have used a lot of words not given. Is that right?
2. What is the correct answer?
3. Should {} be used while decalaring a class?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic