File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How to construct Class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to construct Class?" Watch "How to construct Class?" New topic
Author

How to construct Class?

Anu satya
Ranch Hand

Joined: Mar 17, 2005
Posts: 146
Hello Every body,

I am new to java world. I have a very basic question:

If I need to develop a class where seats has to be booked for flights.(Business and Economic.)Economic category can have only window and airsel seats. Business category can have Window, airsel and middle seat. How to Construct the class for this situation?

Thanks for your time and reply.
Please help!

Regadrs.
[ March 15, 2006: Message edited by: Jim Yingst ]

With Regards,
Anu
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
That seems to be an assignment of some kind that you should be working on. We're not going to do it for you. If you want help, show us what you have done so far, and where you're stuck, and then we'll help you get going again.


Ping & DNS - my free Android networking tools app
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

The place to start with any class definition is usually the interface: What are the public methods? Once you have these, build the rest of the class to support implementation of these methods.

So, as Ulf said, what do you have so far? And what specific problems are you having?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Tony pony
Greenhorn

Joined: Mar 18, 2006
Posts: 2
I can help if u post code


Need java video tutorials?<br />http://arkserver.servehttp.com/index.php?board=311.0<br />not mine, just pointing
Raj Maheshwari
Ranch Hand

Joined: Jul 02, 2004
Posts: 34
We can guide you if you post what your current solution is so far and how you're approaching the problem. Just a straight forward HOW TO do the thing would give the answer away, wouldn't it? And it would completely beat the purpose of your assignment.

Start thinking about how it would be organized in the real world and encapsulate it in to classes. Remember, each class must serve a purpose to solve a larger problem and provide other classes with functionality.

hope that helps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to construct Class?
 
Similar Threads
Seats class in the business domain model
Some do's & don'ts
A question on Seats
Class Diagram
Passed Part II and III, thanks JavaRanch