Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The program to be developed is a menu-driven program that will keep track of par

ID: 3692052 • Letter: T

Question

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

Explanation / Answer

#include <iostream>

using namespace std;

struct record{
  
int ticketid, officer number, pin_number;
int violation code, date; float time;
char Vlicense_Pstate[50], location[20];
};

int main(){


int o;
while(o!=0)
{
cout<<endl << "MENU";
cout<< endl <<"Enter the choice:";
cout<< endl <<"Enter 1 for creating database";
cout<< endl <<"Enter 2 for displaying database";
cout<< endl <<"Enter 3 for searching a record";


cin>>o;
switch(o)
{
case 1: create();break;

case 2:display();break;

case 3:search();break;
case 0:exit(0);break;
default:cout<< endl <<"You have entered a wrong choice!!!";
}
}
create()
{
struct record r[10];
int i;
cout << "Enter the below information : " << endl;
for(i=0;i<10;++i)
{

r[i].ticketid=i+1;


cout << endl << "Details of ticket id : " << r[i].ticketid << endl;

cout << "Enter office number : ";
cin >> s[i].office number;
   cout << endl << "Enter location : ";
cin >> s[i].location;
   cout << "Enter vehicle license plate state : ";
cin >> s[i].Vlicense_Pstate;
cout << endl << "Enter pin number : ";
cin >> s[i].pin_number;
   cout << endl << "Enter date of the month : ";
cin >> s[i].date;
   cout << endl << "Enter time now : ";
cin >> s[i].time;
   cout <<endl<< "Enter violation code : ";
cin >> s[i].violation code;
  

cout << endl;
}
}

display()
{
cout << "Displaying information : " << endl << endl;
for(i=0;i<10;++i)
{

cout << endl << "Information for ticketid : " << i+1;
cout << endl << "office number is : " << s[i].office number;
cout << endl << "location is : " << s[i].location;
cout << endl << "vehicle license plate state is : " << s[i].Vlicense_Pstate;
cout << endl << "pin number is : " << s[i].pin_number;
cout << endl << "violation code is : " << s[i].violation code;
cout << endl;

}
}

search()
{
int key;
cout << "Enter the ticketid required to search :";
cin>>key;

// compare key with ticketid array and display the result

//if(key==

cout<< "office number"<< s[i].office number << "location" << s[i].location;

}

note-the above code can help to answer the question.