C Programming: Transaction and Vehicle Structs
Section A: Transaction Data Management
Defining the Transaction Structure
A. Create a structure Transaction with the following attributes: ID (integer number), account_number (array of characters), amount (float), and typology (character).
typedef struct {
char plate_number[PLATELENGTH + 1];
char brand[NAMELENGTH];
char model[NAMELENGTH];
int production_year;
} Vehicle;Constants for Transaction Typology
A. Define the max length for the attribute "account" to 20, and two constants to determine the typology of the transaction, such as CREDIT or DEBIT (respectively 'c' and 'd').
#define MAX_ACCOUNT_LEN 20
#define CREDIT 'c'
#define DEBIT 'd'Reading Transaction Data from Input
A. Create a method named readInstance() that reads from the... Continue reading "C Programming: Transaction and Vehicle Structs" »
English with a size of 6.92 KB