LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2011, 04:03 AM   #1
whiteshark2012
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Rep: Reputation: 0
small java program to manage 2 apartments


hi guys , this is my first post and I would like to get some help from you , so what should be the answer for this question ?


:::::::::::::the question::::::::::::::::

THE UNIVERSITY APARTMENTS

The University Apartments provides apartment rental to university students at affordable rates, with optional facilities:

Apartment Type A, 2 bedrooms and equiped with kitchen and laundry facilities. The monthly rental for the rooms in this apartment type is RM300.
Apartment Type B, 3 bedrooms includes one master bedroom with attached bathroom but does not have kitchen and laundry facilities. The monthly rental for the rooms in this apartment type is RM200 and students staying in the master bedroom will be paying an additional 40%.

Each apartment may house a maximum of 3 students. Students are required to check out from the apartment unit when the current semester ends.

Create an application to manage the university apartments rental:

1. Register new student and assign apartment module
Register and assigns an apartment to the student for 140 days from the date of registration. The module should retrieve the date automatically from the system clock and calculates the expiry date for the apartment rental. Before an apartment is assigned, the system should allow the selection of the type of apartment (i.e. Type A or B), then check for the number of occupants in the apartment. If the apartment already housed 3 students, it should recommend another apartment unit that is still available. Upon registration, student should pay a RM100 for the utility charges, rental deposit for one month and the rental for the current month.

2. Update apartment status module
When a student moves out from an apartment, the apartment status is updated.

3. Reporting module
Generates a report of apartments with full occupancy and another report for apartments where rooms are still available.

4. Search module
Enable the administrator to search for a student's apartment unit using the student id as the search key. The search result should produce the studentís information and the details of the apartment that the student is staying in.

The application should be developed using object-oriented concepts using Student class and Apartment class, implementing the appropriate data fields and methods for the classes. Data may be stored in collections i.e. array of objects, vectors, etc. or into data files except a database. The application user interface needs to be interactive and may be command line based or developed using Java Swing (JFC).
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-17-2011, 11:32 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,553

Rep: Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570
The answer should be an application to manage the university apartment rental. Which you will need to write according to the specifications you were given.



Now, did you have a question other than "can you please do all the work for me"?
 
Old 02-17-2011, 11:49 AM   #3
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
The first thing you need to do is to create separate data structures for:

storing apartment info like which type of room has kitchen and which doesn't, which room is vacant which isn't..etc
This info can be stored in a structure, I don;t what java uses, but look out Google for "C structures", you'll get an idea.

storing student info like :
student id,
check in check out date (should match up with room vacancy date),
type of apartment in which he stays,
fees paid, etc.
 
2 members found this post helpful.
Old 02-17-2011, 12:05 PM   #4
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 720

Rep: Reputation: 32
Break into down into small bits.
I.e. solve one problem first e.g. how do I get expiry date etc.

Good luck

---------- Post added 02-17-11 at 05:06 PM ----------

PS
If you write code that does not work - put it here with the error message and we will try to help.
 
1 members found this post helpful.
Old 02-17-2011, 12:10 PM   #5
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,553

Rep: Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570
Get a good understanding of the Java Collections Framework if you don't already have one. It's extremely useful for a project like this.

Also, you're going to want to model the class heirarchy before you start coding. The best tool I've found for this is UMLet, which works in Linux, OSX and Windows.

Last edited by dugan; 02-17-2011 at 12:17 PM.
 
1 members found this post helpful.
Old 02-28-2011, 07:22 AM   #6
whiteshark2012
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
thnx guys appreciate it
 
Old 02-28-2011, 07:26 AM   #7
whiteshark2012
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Red face

Quote:
Originally Posted by dugan View Post
The answer should be an application to manage the university apartment rental. Which you will need to write according to the specifications you were given.



Now, did you have a question other than "can you please do all the work for me"?
hehehe funny
 
Old 02-28-2011, 09:53 AM   #8
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
How about posting the solution/logic/algorithm here, it may help someone else!
 
Old 02-28-2011, 11:22 AM   #9
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,553

Rep: Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570Reputation: 3570
This was clearly homework, his "question" consisted of posting the requirements, and his response when invited to ask a more specific question about it was "hehehe funny." In this context, the "solution" would be the completed homework assignment. He should definitely not post it here.

Last edited by dugan; 02-28-2011 at 11:33 AM.
 
Old 02-28-2011, 07:14 PM   #10
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by dugan View Post
In this context, the "solution" would be the completed homework assignment. He should definitely not post it here.
I didn't mean that he should put here the compiled programs with the make files, I meant he could have posted whatever he
understood and people could have corrected him...or benefited from him...
 
Old 03-02-2011, 04:38 AM   #11
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
whiteshark2012, simply pasting your entire programming assignment instructions without even taking the time to explain exactly what kind of help you seek, or share what ideas you have (or things you've already tried) is quite hostile to the LQ spirit, and comes off as you wanting other LQ members to do your homework for you. Apparently, that wasn't the case here, and you were only looking for general pointers and whatnot.

Perhaps next time you will put at least as much effort into crafting your question as your fellow LQ members have put into their replies here. That way, you'll reduce the chances of triggering snarky remarks (such as the one you reported), and your post will be less prone to raising red flags with the Mod Team (notice that homework is covered in the LQ Rules).

Last edited by win32sux; 03-02-2011 at 04:40 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to manage host IP addresses on a small LAN Mountain Linux - Software 14 03-31-2009 05:08 PM
how to manage memory to speed up my program eep6sa1@ucy.ac.cy Programming 11 11-27-2008 09:25 AM
How to manage program (package) 'locations' Unforgiven79 Linux - Newbie 3 05-24-2006 08:47 AM
need simple program to manage a mailing list linuxlimbo Linux - Software 0 12-21-2004 06:30 AM
using a small java program to download a web page mrtwice Programming 3 04-23-2003 08:44 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration