Write a program to read the file, Programming Languages

Assignment Help:

Suppose you have a ?le orase of city and country names, like this:

Cluj, Romania
Debrecen, Hungary
Klagenfurt, Austria
Berlin, Germany
Szeged, Hungary
Budapest, Hungary
Lintz, Austria

Write a program towns.pl such that when it will read from the ?le orase will produce a sorted output with each country mentioned once, followed by an alphabetical list of the cities in that country:

Austria: Klagenfurt, Lintz.
Hungary: Budapest, Debrecen, Szeged.
Germany: Berlin.
Romania: Cluj.

Run your program against any other ?le (say, myfile) with structure similar to orase. Then execute your program against both ?les (orase and myfile) simultaneously.


Related Discussions:- Write a program to read the file

What is dynamic binding, Dynamic Binding: - Binding refers to the linking ...

Dynamic Binding: - Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding (late binding) means that the code associa

Otrs customisation using perl, OTRS Customisation using Perl, MySQL Program...

OTRS Customisation using Perl, MySQL Programming OTRS is a perl based open source issue ticket management solution. Default performance features 'note-internal' that is visible

Phonebook entry, The first task is to extend the  NeoPhoneBookEntry and  Ne...

The first task is to extend the  NeoPhoneBookEntry and  NeoPhoneBook classes to accommodate for  four additional contact  details:  Ringtone,  Vibration Pattern,  Led Pattern  and

Develop a mobile phone application for games, You have been asked to set up...

You have been asked to set up a project plan for developing a mobile phone application for London Olympics. Major tasks include conducting some research into different mobile ph

Cobol, Need help with a cobol program.

Need help with a cobol program.

Java packages, Expertsmind brings you unique solution in java assignments ...

Expertsmind brings you unique solution in java assignments Packages A Java packages is a process for planning Java sessions into namespaces just like the segments of Modu

Develop an html document with a nested list, 1. Develop a Web page, indicat...

1. Develop a Web page, indicating an ordered list of the names of your five friends. 2. Develop an HTML document with a nested list indicating the content page of any book 3.

Object-oriented programming paradigm, Object-oriented programming paradigm ...

Object-oriented programming paradigm Object  Oriented  Programming  is  an  aproach  in  which  a  program  is  viewed  as  a  dynamic  network  of collaborating objects, where

Java source code classes and objects, Design and implement a stringed music...

Design and implement a stringed musical instrument class using the following guidelines: a. Data fields for your instrument should include number of strings, an array of stri

Function to check whether a certain ingredient is on pizza, Carnivorous Car...

Carnivorous Carla only eats pizza if it has at least three of the following ingredients: ham, pepperoni, salami, italian sausage, bacon. You have the function contains() to check w

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd