Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project B: Create and Process an Array of Structures Write a program that provides information about two-tear colleges in California. The program expects the name

image text in transcribed
Project B: Create and Process an Array of Structures Write a program that provides information about two-tear colleges in California. The program expects the name of an input file and an output file to be given by the user. If the user does not input any names, default file names should be used, such as in. txt and out. txt. The input files have lines which look like this: The first number represents the rank; it is followed by the school name, year founded, and approximate number of students. Read the list of colleges into an array of structures. You may assume that the maximum size of a college name string is 64 . The program should use either the insertion sort algorithm or the selection sort algorithm to sort the array in ascending order by rank. The college that is ranked \#1 will be displayed first, then #2,3, and so on. Display any k consecutive schools requested by the user. For instance, if the user enters 1 2 , the program displays the first 2 schools in a readable format of your choice. If the user enters 15 , the program displays the first five schools, if the user enters 27 , display 7 schools beginning with the one at index 1(21), and so on. Repeat this process until the user enters 00 . Reject invalid input (such as 15, or 1200 , etc.) Finally write the sorted array to the output file, using the same format as in the input file's format. Run the program once and save the screen output at the end of the source file as a comment. What to upload? Compress source files, input and output files if any, the self assessment report, and nothing else. Upload the compressed file: 26B_LastName_FirstName_H1.zip Input: Use the given input file or create your own input file using the data shown below. in. txt 3 Santa Zarbara City Colloge; 190930587 5. Fasadena Clty coliege: 192422000 14 kest 8t11 a College - Coalingst 19324000 7 Napa Valloy College; 2942.8995 2 Orange Coast College: 194725000 15 Pale Verde Colleger 1947 169I 4 Dtablo Valley Colieger 194924781 6. Foothil1 Coliege; 195718362 12 College of the S1akiyous: 19572473 10 Cuests Colleger 12639571 3 oblotie colleye; 196519000 1. De Atizs College; 1957 24781 11 Feathine River Conmunity Cellege Distriet; 19681635 13 Lake Tahoe Comunity Collegea 19753000 9 Irvite Valley Collegef 198514384

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions