Newbie to Java needs URGENT HELP

Newbie to java needs URGENT HELP!!!!!!!

Page 1 of 1

1 Replies - 1706 Views - Last Post: 19 October 2006 - 09:07 AM Rate Topic: -----

#1 watanabe   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 08-October 06

Newbie to Java needs URGENT HELP

Posted 19 October 2006 - 08:26 AM

Using the ASCII file (see last page) with Cities and their Temperatures (in Celsius), write a Java application to read the file sequentially into an array of objects. Include the following functionality:

1. Print the array. [provide output]

2. Return a reference to the object containing the highest temperature [provide output]

To do this you will require an array of some object type defined by you. The array size should be set to 30. Each element of the array will ‘store’ (or reference) an object. As your program reads each line (a string), it should split it into two distinct fields in order to then form an object and store it in the array. The two fields include a String for “City Name” and an integer for the “Temperature”. You can use a String “Tokenizer” to split the string.

Valletta 29
Alexandria 28
Cairo 20
Johannesburg 27
Lagos 31
Nairobi 27
Casablanca 24
Montreal 23
Washington 27
Boston 19
Moscow 9
Atlanta 24
Havana 30
Kingston 33
Santiago 26
London 21
Calcutta 34
Karachi 30
Madras 33
Shanghai 22
Tokyo 24
Tehran 20
Bombay 31
Rome 25
Paris 24
Madrid 20
Lisbon 23
Frankfurt 23
Amsterdam 22
Dublin 19

Please help. URGENT HELP

Is This A Good Question/Topic? 0
  • +

Replies To: Newbie to Java needs URGENT HELP

#2 Jayman   User is offline

  • Student of Life
  • member icon

Reputation: 421
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Newbie to Java needs URGENT HELP

Posted 19 October 2006 - 09:07 AM

This site has a policy by which you must show a good faith effort on your part to complete your assignment. We will not do the work for you.

Please post whatever code you have at this point, working or not, and someone will be happy to help you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1