
Completed
Posted
Paid on delivery
Your task is to implement class CTaxRegister, which implements a simple tax revenue database. The database is very simplified. We assume the database holds information about all citizens from the moment they born until they die. Each citizen is identified by his/her account. The accounts are strings and are unique in the database. Second, citizens may be positively identified by their names and addresses. We assume the pair (name, address) is unique in the database. That is, there may exist many citizens with the same name (e.g. "John Smith"), there may be many citizens registered with the same address (e.g. "Main Street 10"), however, there may be at most one "John Smith" registered on "Main Street 10". The class shall implement the following public interface: A constructor (without parameters). This constructor initializes a new empty database. Destructor -- it shall free all resources used by the instance. Method birth (name, addr, acct ) which adds a new record to the database. The parameters are name, address and account id of the person being registered. The method returns true if it succeeds, or false if it fails (the pair name, addr is already present in the database, or the acct is not unique in the database). Method death (name, addr) removes the corresponding record from the database, the record is identified by the name and address. The method returns true if it succeeds, or false if it fails (the corresponding record was not present). Methods income add amount to the income of some account. There are two variants of the method: the account is either identified directly by account id, or the account is identified by the owner name and address. The methods return true if they succeed, or false if they fail (the corresponding person was not found). Methods expense add amount to the expenses of some account. There are two variants of the method: the account is either identified directly by account id, or the account is identified by the owner name and address. The methods return true if they succeed, or false if they fail (the corresponding person was not found). Method audit ( name, addr, acct, sumIncome, sumExpense) searches the database for the record identified by owner name and address. The method fills the acct, sumIncome, and sumExpense output parameters accordingly. The method returns true if it succeeds, or false if it fails (the corresponding person was not found). Moreover, if the method fails, the output parameters shall be left unmodified. Method listByName creates and returns a new instance of class CIterator. The exact interface of the returned object is listed below, the object is used to access the records in the tax register. The records are visited in a sorted way, the order will be based on the person names (i.e., the person with the lexicographically smallest name is visited first). If the tax register contains two records with the same name, then the record with lexicographically smaller address goes first.
Project ID: 39207472
2 proposals
Remote project
Active 4 mos ago
Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

Prague, Czech Republic
Payment method verified
Member since Mar 10, 2025
$10-20 USD
$10-50 USD
$800 USD
$25-50 USD / hour
₹12500-37500 INR
₹400-750 INR / hour
₹12500-37500 INR
$12-30 SGD
£750-1500 GBP
€8-30 EUR
$10-11 USD
$25-50 USD / hour
₹1500-12500 INR
$30-250 USD
$250-750 CAD
₹750-1250 INR / hour
€250-750 EUR
$30-250 USD
$15-25 USD / hour
$2000-3000 USD
$10-30 USD
₹250000-500000 INR