• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bluej Classes , Interfaces and Abstract classes appropriate names  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My Project is called Airlines_Booking

Can someone please check this naming convention of mine and if its not appropriate can you please suggest appropraite names wherever possible?

1 ) First there's an interface that defines all the methods I will use in my upcoming classes ----> I call it Basic

2) There's is an abstract class that implements the interface and has the common methods of my Airline classes (methods like takename() , takenoofpeople() etc.)----> I call it CommonAirline_Methods

3) There's a class that has the method cost if user wants to travel in Economy class (you must be aware of the class that are available in Airlines like Economy, Business, and Premium Economy) and this class extends the abstract class -----------------> I call it Economy

4) There's a class that has the method cost if user wants to travel in Business class and obviously this also extends the abstract class because the common methods of all the classes are there in the abstract class -------> I call it Business

5)There's a class that has the method cost if user wants to travel in Premium Economy and same thing as the other two classes -----> I call it PremiumEconomy

6) There's a common class in which I ask the user that "do you want to travel in Economy, Premium Economy or Business class " and if he chooses 'E' then I create an object of class E and execute it's methods easily and similarly if he chooses B or P..............THis is the most important class of the project since the user( or a lay man) has to execute only this class for booking the tickets..............--> I call it Book_Tickets

I have just named everything and the project is working perfectly. This is the last step ..can someone please help me to name the classes .Pleasee ..Thanks a lot.
 
Ranch Hand
Posts: 614
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The names seem good except for "Book_Tickets".
Underscore in between a variable/method/class name should be avoided.
It can be "BookTickets".
 
Sheriff
Posts: 4289
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your names look good. I would take out the underscores (_), though. And I might call CommonAirline_Methods just Common.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!