Elevations of the great lakes in vectors

Assignment Help Computer Engineering
Reference no: EM132091578

Pascal allows the use of enumerated types as index types. For example, if we define the enumerated type GreatLakes to have the values Erie, Ontario, Huron, Michigan, and Superior (ordered here by increasing volume of water), then we can define:

type GreatLakes = (Erie, Ontario, Huron, Michigan, Superior);

area: array [ GreatLakes ] of integer,

elevation: array [ GreatLakes ] of real;

(and give them values)

area := ( 9910, 7340, 23000, 22300, 31700 );

elevation := ( 570.38, 244.77, 578.68, 578.68, 600.38 );

Now we can access individual elements to find, for example, that

area[Erie] = 9910

area[Superior] = 31700

elevation[Huron] = elevation[Michigan] = 576.68

In the above definitions we stored the areas and elevations of the Great Lakes in vectors (1- dimensional arrays).

Restate these definitions in order to store the same information in a structure that is:

(a) A vector of records

For defining records, use the syntax:

Person: record

age: integer;

sex: (Male, Female);

height, weight: real;

married: Boolean;

end;

(b) A record of vectors

(c) A 2-dimensional array indexed by type GreatLakes and by another enumerated type.

Reference no: EM132091578

Questions Cloud

What is elements of a strategic plan : What is elements of a strategic plan and explain why strategic planning is important in global environment?
Primary difficulties associated with a middle-aged person : What do you think are some of the primary difficulties associated with a middle-aged person?
Describe appropriate selectional restrictions on the verbs : Cluster these senses using the definitions of homonymy and polysemy given in chapter 19 (Speech and Language Processing -Jurafsky Martin).
Create a user friendly gui app using the code parameters : Display a message dialog similar to the one shown in listing 2.12, but the message must pertain to VendingChange and not ChangeMaker.
Elevations of the great lakes in vectors : Pascal allows the use of enumerated types as index types.In the above definitions we stored the areas and elevations.
Create a scanner to process the string : You can use a Map where the keys are the Integer length and the values are the Set of the words of that length. This is similar to hw 17.
What is the average case time complexity for linear search : What is the average case time complexity for linear search on a sorted array? Explain (and/or draw a diagram).
Primary objective of statistical process control : Describe the primary objective of statistical process control.
Why is it important for operations managers : Why is it important for operations managers to understand the local culture and practices of the countries

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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