Persistent
Company
Programming
Database
Design a data structure for Income Tax department. . Following information is to be stored about users :
Income tax no.
Name
Address(as a single string)
Tax amount
Whether tax paid or not paid for previous year
Group (valid values are High/Low depending on amount of tax to be paid. If tax to be paid > 1,50,000 then Group should be stored as High else Low)
Category (Valid values range between 1 to 10)
Write a program which will populate this data structure.
The count of users(records) to be created should be accepted as user input.
Once the date structure is ready, the program should search and display users with any of the given criteria like Income tax no., Tax amount, Name, Whether tax paid or not paid for previous year, group and category.
Read Solution (Total 1)
-
- #include
#include
using namespace std;
class tax_info
{
public:
int Income_no;
char Name[10] ;
char Address[100] ;
float tax_amount;
char prv_tax[10];
char group[10];
int category;
void insert_info()
{
coutIncome_no;
coutName;
coutAddress;
couttax_amount;
coutprv_tax;
if(tax_amount>150000)
strcpy(group, "High");
else
strcpy(group, "High");
coutcategory;
}
void display()
{
cout - 6 years agoHelpfull: Yes(3) No(4)
Persistent Other Question