CODE in C please This assignment will ask you to apply the following concepts from class: Design To accomplish this task
Posted: Mon Jun 06, 2022 2:15 pm
CODE in C please
This assignment will ask you to apply the following concepts
from class:
Design
To accomplish this task, each riding will be stored as a
structure with the following attributes:
Your program will then use an array of structures to represent
up to 124 possible ridings.
Implementation
Your program should continuously prompt the user for one of five
possible commands:
Other implementation notes
Sample output $ ./election_db * 2211 Election ***************** Enter operation code: p Riding Code Riding Name Population Enter operation code: i Enter operation code: p Riding Code Riding Name Portsoy West Population 120981 0 Enter operation code: 1 Enter riding code: 1 Enter riding name: Chepstow North Centre Enter population: 101635 Enter the area: 4487.01 Enter operation code: i Enter riding code: 3 Enter riding name: Huntley River Enter population: 68488 Enter the area: 141.23 Enter operation code: 1 Enter riding code: 3 Riding already exists. Enter operation code: p Riding Code Riding Name 8 Portsoy West 1 Chepstow North Centre Huntley River 3 Enter operation code: s Enter riding code: 1 Riding Code Riding Name 1 Chepstow North Centre Enter operation code: u Enter riding code: 1 Enter riding name: Chepstow North Enter population: 101500 Enter the area: 4487.01 Enter operation code: p Riding Code Riding Name 8 1 3 Enter operation code: q $ Enter riding code: 0 Enter riding name: Portsoy West Enter population: 120981 Enter the area: 25.53 Portsoy West Chepstow North Huntley River Population 120981 101635 68480 Population 101635 Population 120981 101500 68480 Area Area 25.53 Area 25.53 4487.01 141.23 Area 4487.01 Area 25.53 4487.01 141.23
This assignment will ask you to apply the following concepts
from class:
Design
To accomplish this task, each riding will be stored as a
structure with the following attributes:
Your program will then use an array of structures to represent
up to 124 possible ridings.
Implementation
Your program should continuously prompt the user for one of five
possible commands:
Other implementation notes
Sample output $ ./election_db * 2211 Election ***************** Enter operation code: p Riding Code Riding Name Population Enter operation code: i Enter operation code: p Riding Code Riding Name Portsoy West Population 120981 0 Enter operation code: 1 Enter riding code: 1 Enter riding name: Chepstow North Centre Enter population: 101635 Enter the area: 4487.01 Enter operation code: i Enter riding code: 3 Enter riding name: Huntley River Enter population: 68488 Enter the area: 141.23 Enter operation code: 1 Enter riding code: 3 Riding already exists. Enter operation code: p Riding Code Riding Name 8 Portsoy West 1 Chepstow North Centre Huntley River 3 Enter operation code: s Enter riding code: 1 Riding Code Riding Name 1 Chepstow North Centre Enter operation code: u Enter riding code: 1 Enter riding name: Chepstow North Enter population: 101500 Enter the area: 4487.01 Enter operation code: p Riding Code Riding Name 8 1 3 Enter operation code: q $ Enter riding code: 0 Enter riding name: Portsoy West Enter population: 120981 Enter the area: 25.53 Portsoy West Chepstow North Huntley River Population 120981 101635 68480 Population 101635 Population 120981 101500 68480 Area Area 25.53 Area 25.53 4487.01 141.23 Area 4487.01 Area 25.53 4487.01 141.23