Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can someone please help me to check my bluej classes' names according to the given description?  RSS feed

 
Manaf Abdul
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Project is called Airlines_Booking


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 randomly 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.
 
Les Morgan
Rancher
Posts: 768
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about "Junk"? I name all my classes that I work with for help on the forums as Junk. For your assignment though you might want "TravelClass" or "TravelType".
Manaf Abdul wrote:My Project is called Airlines_Booking


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

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.)

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

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

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

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 have just randomly 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.
 
Manaf Abdul
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Les Morgan wrote:How about "Junk"? I name all my classes that I work with for help on the forums as Junk. For your assignment though you might want "TravelClass" or "TravelType".
................. Are you being sarcastic bro?
 
Les Morgan
Rancher
Posts: 768
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first part is, but the second part is not.
Manaf Abdul wrote:
Les Morgan wrote:How about "Junk"? I name all my classes that I work with for help on the forums as Junk. For your assignment though you might want "TravelClass" or "TravelType".
................. Are you being sarcastic bro?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!