• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design and implement

 
Clare Wright
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Very new to java so sorry if this sounds stupid. Doing some exercises - if the question says Design and Implement a class, do you create a ClassName.java file in which your class is designed and implemented? I remember doing C++ where the class definition was a separate file and the implementation in another file.

Thanks.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12101
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in java, everything for a class goes into one file. you cannot split a single class over two files.
 
Clare Wright
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
much appreciated. now i can move ahead!
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Design" means: think about how your class is going to look, what member variables and methods are you going to put into it. You can do this in your head, or on paper perhaps.

"Implement" means: use a text editor or IDE to write the actual Java code for the class.

The "design" part is more thinking than typing, and the "implement" part is more typing than thinking.
 
Clare Wright
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Jesper. My textbook seems to be dealing with GUIs at the very end I think if they were introduced first it might have made things clearer. But who am I to judge I'm a baby greenhorn.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dealing with GUIs at the very end
That is the way we usually work in Java; we start with apps which run from a command prompt or shell (such tools and BlueJ and IDEs simply emulate a command prompt to start a class).

We get to GUIs later on, in the first instance coding by hand rather than doing what you do in VB or C# where you assemble a GUI from a palette.
 
Clare Wright
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I'm starting to get that - feeling a lot better - this Big Moose Saloon really is a friendly place for beginners. Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic