Data from data file:
55
Francine Palau 23 N 730248
Kam Swindler 57 Y 468119
Migdalia Constable 21 N 493364
Larry Johnson 67 N 710708
Cedrick Whitting 37 N 722619
Evelynn Reising 38 N 451456
Flor Wixon 62 N 710822
Howard Johnson 68 N 438503
Bailey Kimsey 61 N 489617
Jerrica Woo 72 N 892411
Billy Gunn 41 Y 569138
Branden Bartel 43 Y 184273
Maryalice Crow 39 N 764832
Hailey Morris 18 Y 608059
Cheyenne Diehl 51 N 679397
Geraldine Streit 53 Y 409136
Rory Zank 52 N 162945
Janelle Cuff 38 Y 350092
Nikia Brucker 28 N 364666
William Boes 67 Y 414943
Leona Weller 27 N 412133
Lela Streit 29 Y 727911
Davida Hartranft 27 N 670018
Morgan Girard 29 N 809264
Antione Streit 33 N 661175
Kirby Arline 31 N 187333
Malka Apicella 33 N 364787
Kacy Zuccaro 47 N 674062
Jerlene Boes 45 Y 386365
Laurie Boes 44 N 295222
Jarrod Fichter 47 Y 632892
Edythe Royals 41 Y 412256
Claudette Dumont 49 Y 196029
Harland Gerstner 41 N 109270
Sabra Nolin 43 Y 882190
Sonny Johnson 72 N 837679
Monte Hulett 71 Y 128055
Linsey Mulloy 73 Y 666049
Cyrus Mckillip 62 N 564015
Dara Sadowski 60 Y 190400
Herman Moates 28 N 258557
Howard Zank 28 Y 599381
Maxima Harada 27 N 879187
Queen Sackrider 25 Y 600807
Rosie Carder 21 N 587389
Shiloh Clairmont 23 Y 604970
Sheryl Dykema 72 Y 156943
Theodora Ammann 43 N 892162
Rosetta Streit 41 N 238938
Zelma Brackens 39 Y 696127
Laree Julius 37 N 728400
Kira Tillett 33 Y 702861
Alayna Mayville 31 N 414247
Paulette Streit 26 Y 349362
Fidel Oceguera 27 N 476300
Please write it in Python!!!
Requirements What's the most exciting thing you can think of? Exactly! The DMV! Today we're going to write a program that reads in Drivers License Records from file and then let's the user interact with the data. Data File Here is the data file you will read from: link It is formatted in the following way: <drivers license number> <first name> <last name> <age> <registered voter?> <drivers license number> <first name> <last name> <age> <registered voter?> <drivers license number> <first name> <last name> <age> <registered voter?> <drivers license number> <first name> <last name> <age> <registered voter?> Sample from file: 381043 Francine Palau 23 N 449122 Kam Swindler 57 Y 401934 Migdalia Constable 21 Y Classes Drivers License Class • Design a Drivers License class . Note that a Driver has a first name, last name, age, voter status, and license number . All member variables should follow private conventions (start the name with an underscore) • Create getters and setters as they are needed • Overload the following operators/methods (even if not all may be directly used) _It_two DriverLicenses True if the left hand side has a smaller license number _gt two DriverLicenses True if the left hand side has a larger license number le two DriverLicenses True if the left hand side has a smaller or equivalent license number ._ge_two DriverLicenses True if the left hand side has a larger or equivalent license number Leq__two DriverLicenses are equal if they have the same license number • _ne_two DriverLicenses are NOT equal if they do not have the same license number _str_returns a string that contains all drivers license data a user-friendly, readable way (see below for format) • NOTE: This class only contains data, it doesn't not interact with the user! _repr__ returns a string that contains a string that could be used to recreate the Drivers License record
DMV Class The DMV class will be in charge of. • Reading and storing the drivers license records • Interacting with the user . Print menus • Validate user menus choices, meaning making sure they pick a valid menu option All I/O to the terminal Here's the menu for the user: Select an option: 1) Print all Drivers Info, sorted by drivers license numbers 2) Print all young, unregistered voters 3) Print drivers by last initial 4) Print drivers of a specific age 5) Quit Enter your choice: Option Description Creates a sorted listing of all Licenses (NOTE: original list is unchanged), then prints all drivers and all their information in the following format: <last name>, <first name> (<age>): <drivers license number> Print all Drivers Info, sorted by drivers license numbers Example of a single entry (you'll print all entries) Johnson, Larry (67): 301288 Print all young, unregistered voters Print drivers by last initial Print driver of a certain age Prints the driver information in the same format as the previous option, but only prints those who are between the ages of 18 and 24 (inclusive) AND not registered to vote Asks the user for single character, and print the information for all drivers that have a lasst name starting with that letter (case-insensitive) OR print "No record found." if no drivers have a first name starting with that character. Prompts the user for an age. Print all drivers with this age or print "No record found." Quit Exits the program
Requirements What's the most exciting thing you can think of? Exactly! The DMV! Today we're going to write a program tha
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Requirements What's the most exciting thing you can think of? Exactly! The DMV! Today we're going to write a program tha
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!