Question
Use the file Justices.txt that contains data about the Supreme Court justices, past and present as of January 2015. Each record of the file contains
Use the file Justices.txt that contains data about the Supreme Court justices, past and present as of January 2015. Each record of the file contains six fieldsfirst name, last name, appointing president, the state from which they were appointed, year appointed, and the year the justice left the court. (For current justices, the last field is set to 0.) The first five lines of the file are as follows:
Write a program that requests a state abbreviation as input and displays the justices appointed from that state. The justices should be ordered by their years served. The output should also display the last name of the appointing president and the length of time served. (Note: For current justices, use 2015 -yrAppointed as their time of service. Otherwise, use yrLeft -yrAppointed.) Also, the program should inform the user if no justices have been appointed from the requested state. See Fig.5.20.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started