[SOLVED] CAP5605 -Project 1

35.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

Enter the file name: States.csv

 

There were 50 state records read.

 

  1. Print a state report
  2. Sort by State name
  3. Sort by Population
  4. Find and print a given state
  5. Quit

Enter your choice: 1

 

State Name    Capital City  State Abbr  State Population  Region            US House Seats

——————————————————————————————

Louisiana     Baton Rouge      LA       4,625,470         South                6

Wisconsin     Madison          WI       5,742,713         Midwest              8 New Mexico    Santa Fe         NM       2,085,287         Southwest            3 . . .

 

  1. Print a state report
  2. Sort by State name
  3. Sort by Population
  4. Find and print a given state
  5. Quit

Enter your choice: 3

 

States sorted by Population.

 

  1. Print a state report
  2. Sort by State name
  3. Sort by Population
  4. Find and print a given state
  5. Quit

Enter your choice: 1

 

State Name    Capital City  State Abbr  State Population  Region            US House Seats

——————————————————————————————

Wyoming       Cheyenne         WY       582,658           West                 1

Vermont       Montpelier       VT       626,630           New England          1 North Dakota  Bismarck         ND       723,393           Midwest              1 . . .

 

  1. Print a state report
  2. Sort by State name
  3. Sort by Population
  4. Find and print a given state
  5. Quit

Enter your choice: 4

 

Enter the state name: Florida

Sequential search

 

State Name:        Florida

Capital City:      Tallahassee

State Abbr:        FL

State Population:  19,552,860

Region:            South

US House Seats:    27

 

  1. Print a state report
  2. Sort by State name
  3. Sort by Population
  4. Find and print a given state
  5. Quit

Enter your choice: 4

 

Enter the state name: Canada

Sequential search

 

Error: State Canada not found

 

  1. Print a state report
  2. Sort by State name
  3. Sort by Population
  4. Find and print a given state
  5. Quit

Enter your choice: 2

 

States sorted by State name.

 

  1. Print a state report
  2. Sort by State name
  3. Sort by Population
  4. Find and print a given state
  5. Quit

Enter your choice: 1

 

State Name    Capital City  State Abbr  State Population  Region            US House Seats

——————————————————————————————

Alabama       Montgomery       AL       4,833,722         South                7

Alaska        Juno             AK       735,132           West                 1 Arizona       Phoenix          AZ       6,626,624         Southwest            9 . . .

 

 

  1. Print a state report
  2. Sort by State name
  3. Sort by Population
  4. Find and print a given state
  5. Quit

Enter your choice: 4

 

Enter the state name: Kentucky

Binary search

 

State Name:        Kentucky

Capital City:      Frankfort

State Abbr:        KY

State Population:  4,395,295

Region:            South

US House Seats:    6

 

  1. Print a state report
  2. Sort by State name
  3. Sort by Population
  4. Find and print a given state Quit

Enter your choice: 23

Invalid choice enter 1-5: 0

Invalid choice enter 1-5: A

Invalid choice enter 1-5: 5

 

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.