Team up with two to three other students and jointly decide how you would organize, order, and locate the data used in the following application. Be prepared to present your group's design to the rest of the class. The program to be developed is a menu-driven program that will keep track of parking tickets issued by the village that is hiring you. When a ticket is issued the program must be able to accept and store the following information: ticket number, officer number, vehicle license plate state and number, location, violation code (this indicates which parking law was violated), and date and time written. The program must store information on the amount of the fine associated with each violation code. When a ticket is paid the program must be able to accept and store the information that it has been paid, the amount of the payment, and the date the payment was received. The program must be able to accept inquiries such as displaying the entire ticket record when a ticket number is entered. The program must also be able to produce the following reports: A list of all tickets issued on a specific date, ordered by ticket number A list of all tickets for which payment was received on a specific date and the total amount of money collected that day A report of all tickets issued in a one-month period, ordered by officer number, with a count of how many tickets each officer wrote A report of all tickets that have not yet been paid, or for which payment received was less than payment due, ordered by vehicle license number

Short Answer

Expert verified
Answer: The key functionalities in a parking ticket tracking program include issuing tickets, recording payments, making inquiries, and generating reports such as tickets by date, payments by date, tickets by officer, and unpaid tickets.

Step by step solution

01

Defining Variables and Data Structures

First, we need to create a data structure to represent the parking ticket data. We can use a class or a dictionary for this purpose. The structure should contain fields for ticket number, officer number, vehicle license plate state and number, location, violation code, date and time issued, fine amount, payment status, amount paid, and payment date.
02

Creating Functions to Input and Store Information

Create functions to input and store the ticket data. For example, create a function called "issue_ticket" that will accept the required data when a ticket is issued and then store it in the data structure that we created in Step 1. Similarly, create a function called "record_payment" to accept the ticket number, payment amount, and issued date. This function should update the corresponding ticket's payment status, amount paid, and the payment date.
03

Functions for Inquiries

Now we need to create functions that accept inquiries and generate reports. Define a function called "ticket_inquiry" that takes the ticket number as an input and displays the entire ticket record associated with that number.
04

Creating Functions for Reports

Create a function called "tickets_by_date" that accepts a specific date as input and returns a list of all tickets issued on that date, ordered by ticket number. Create another function called "payments_by_date" to list all tickets for which payment was received on a specific date and the total amount of money collected that day. Define a function called "tickets_by_officer" that, given a one-month period, generates a report of all tickets issued during that month, ordered by officer number, with a count of how many tickets each officer wrote. Lastly, create a function called "unpaid_tickets" that generates a report of all tickets that have not yet been paid, or for which payment received was less than payment due, ordered by vehicle license number.
05

Implementing the Menu-driven Program

Finally, develop a menu-driven program that allows the user to interact with the system. The user should be able to choose between different tasks, such as issuing a ticket, recording a payment, making inquiries, and generating reports. You could use a loop that continuously asks the user for input, and direct them to the appropriate function based on their input. With these steps, the students have a clear guideline for how to create a parking ticket tracking program that can input, store, and display the relevant information.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Complete the following table by calculating the average and maximum number of comparisons the linear search will perform, and the maximum number of comparisons the binary search will perform. $$\begin{array}{l|lllll} & 50 & 500 & 10,000 & 100,000 & 10,000,000 \\ \text { Array Size } \rightarrow & \text { Elements } & \text { Elements } & \text { Elements } & \text { Elements } & \text { Elements } \\ \hline \begin{array}{l} \text { Linear Search } \\ \text { (Average Comparisons) } \end{array} & & & & & \\ \hline \begin{array}{l} \text { Linear Search } \\ ( \text { Maximum Comparisons) } \end{array} & & & & & \\ \hline \begin{array}{l} \text { Binary Search } \\ ( \text { Maximum Comparisons) } \end{array} & & & & & \\ \hline \end{array}$$

The average number of comparisons performed by linear search to find an item in an array of \(\mathrm{N}\) elements is ___________.

Assume an array of structures is in order by the customerID ficld of the record, where customer IDs go from 101 to 500 . A) Write the most efficient pseudocode algorithm you can to find the record with a specific customerlD if every single customer ID from 101 to 500 is used and the array has 400 elements. B) Write the most efficient pscudocode algorithm you can to find a record with a customer ID near the end of the IDs, say 494 , if not every single customer 10 in the range of 101 to 500 is used and the array size is only 300 .

If an array is sorted in ____________ order, the values are stored from lowest to highest.

Which sort, bubble sort or selection sort, would require fewer passes to sort a set of data that is already in the desired order?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free