Station Status Board – Task 1
Your monitoring programs have proven valuable enough that the station's chief engineer wants to expand their scope. Until now, you have been tracking individual subsystems one at a time, running separate programs for reactor cooling, power distribution, and other systems. This approach worked when each system was monitored independently, but it has become inefficient.
The chief engineer explains that Erebos Station has eight primary subsystems that require constant monitoring. Every hour, the central diagnostic system runs a complete check of all eight and writes the results to a single status file. Each subsystem reports its name, its most recent measurement, and whether it is operating normally. The engineering team currently reads this file manually, but they want a program that can load the data and present a clear summary.
The status file is named station_status.txt and contains exactly eight lines, one for each subsystem. The file is regenerated every hour with updated readings, so your program will need to read and process all eight entries each time it runs. Each line contains several pieces of diagnostic information, but for now you only need the first three fields: the subsystem name, its current reading with units, and its operational status. The remaining fields contain historical and threshold data that the diagnostic system tracks but that you won't need yet.
ReactorCooling 42% NORMAL 35% 58% 35% 127 14:23
PowerDistribution 119V NORMAL 115V 124V 117V 134 14:23
LifeSupport 198000ppm NORMAL 195000ppm 205000ppm 195000ppm 128 14:23
Navigation 0.02deg WARNING 0.00deg 0.08deg 0.05deg 131 14:23
ThermalRegulation 18C NORMAL 16C 22C 15C 129 14:23
WasteRecycling 87% NORMAL 82% 95% 80% 126 14:23
CommArray 94% NORMAL 89% 98% 85% 133 14:23
DockingClamps 3201kPa NORMAL 3150kPa 3280kPa 3100kPa 130 14:23
Your program should read the status file and store the information for all eight subsystems. Once the data is loaded, the program should print a summary that shows each subsystem's name, current reading, and status. The output should present the subsystems in the order they appear in the file so that engineers can quickly scan for any warnings or abnormalities.
For the example data shown above, a correct program would produce output similar to:
=== Station Status Summary ===
ReactorCooling: 42% [NORMAL]
PowerDistribution: 119V [NORMAL]
LifeSupport: 198000ppm [NORMAL]
Navigation: 0.02deg [WARNING]
ThermalRegulation: 18C [NORMAL]
WasteRecycling: 87% [NORMAL]
CommArray: 94% [NORMAL]
DockingClamps: 3201kPa [NORMAL]
Systems checked: 8
Systems with warnings: 1
The task is straightforward for now—simply read the data and present it clearly. The chief engineer mentions that soon the crew will need to query specific subsystems by name, but for this first version, a simple sequential report is enough. She also notes that the eight subsystems listed are the only ones that report to this file, and that list has not changed in years.