Vcoderz Community
We create websites that have it all, beauty & brains
Lebanon Web Design & Development - Coddict
 

Go Back   Vcoderz Community > Computer Zone > Computers & Information Technologies

Notices

Computers & Information Technologies « Everything related to computers and internet. »

Closed Thread
 
Share Thread Tools Search this Thread
Old 04-29-2010   #1
7anzala
Registered Member
 
7anzala's Avatar
 
Last Online: 05-15-2012
Join Date: Sep 2006
Posts: 530
Thanks: 9
Thanked 41 Times in 34 Posts
Groans: 0
Groaned at 1 Time in 1 Post
Default Java Please Help ASAP

hey all I have to submit this before midnight and i know nothing about any one can help??????

(a)
The class UFOSurvey needs a single private instance variable called alienSightings. Write the declaration for this variable considering that:
o
It should be declared to be of a suitable interface type to hold a map whose keys are integers, and whose values are a set of strings.
o
More colors may need to be added to any area at any time. An area code is only included when there is color data recorded for that area. The data should be stored in such a way that the area codes are kept in ascending numerical order when new area codes are added.
o
The colors for each area code need not be kept in any specific order. For any given area code, a given color should never be recorded more than once.

hala2 I solved That :

private Map<Integer,Set<String>> alienSightings;
{
}



(b)
Write a zero-argument constructor that creates an empty instance of a suitable class that implements a map and assigns it to alienSightings.

and i solved that kamen:

public UFOSurvey()
{
super();
alienSightings=new TreeMap<Integer,Set<String>>();

}

(c)
Write an instance method for the UFOSurvey class called addSighting(). The method should take two arguments, one for an area code, and one for a colour. If this is a new area code the method should add an entry to the map for that code with the given colour, otherwise the method should simply add a colour to the existing collection of colours for that area, unless that colour is already in the collection, in which case there should be no change. The message answer should be true if the map has changed, otherwise false.
(d)
The UFOSurvey class needs a second instance method called findAreasForColour() which takes a string argument and returns a set of all areas with a sighting of that colour. This method should work irrespective of how many entries might subsequently be added to alienSightings.

please help me.....


__________________
ALEXANDER Al-Kabeer
Gonna rule you all...
7anzala is offline  
Old 04-29-2010   #2
7anzala
Registered Member
 
7anzala's Avatar
 
Last Online: 05-15-2012
Join Date: Sep 2006
Posts: 530
Thanks: 9
Thanked 41 Times in 34 Posts
Groans: 0
Groaned at 1 Time in 1 Post
Default

no one to help?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
__________________
ALEXANDER Al-Kabeer
Gonna rule you all...
7anzala is offline  
Old 04-29-2010   #3
Tawa
 
Tawa's Avatar
 
Last Online: 12-20-2021
Join Date: Mar 2006
Posts: 6,245
Thanks: 2,121
Thanked 3,365 Times in 1,740 Posts
Groans: 29
Groaned at 44 Times in 35 Posts
Default

You still have 4 hours dude, good luck [Yes I R Rude]
__________________
What we do in life, echoes in eternity.
Tawa is offline  
Old 04-30-2010   #4
Google

 
Google's Avatar
 
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
Default

The time it took you to write this thread would be enough to finish the code.
__________________

Google is offline  
Old 04-30-2010   #5
7anzala
Registered Member
 
7anzala's Avatar
 
Last Online: 05-15-2012
Join Date: Sep 2006
Posts: 530
Thanks: 9
Thanked 41 Times in 34 Posts
Groans: 0
Groaned at 1 Time in 1 Post
Default

i didnt write it I copy paste ......sa7ee7 inkon zen5een :P
i finished it and submited it ...

Thread Closed :P Admins shufu sheghelkon :P
__________________
ALEXANDER Al-Kabeer
Gonna rule you all...
7anzala is offline  
Closed Thread

  Vcoderz Community > Computer Zone > Computers & Information Technologies

Tags
asap, java



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:43 AM.


Lebanon web design and development
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Share