Task 2 : Abstract Data Type
- FORK this repositori ASD_Task_2 to your GitHub account
- CLONE ASD_Task_2 repository from YOUR OWN ACCOUNT
- open and modify codes in *.cpp and *.h files inside project ASD_Task_2
- write your code inside the provided space in each functions/procedures
- COMMIT and PUSH your project to your account
- create a Pull Request
TODO: create a new Data type with specification: - an integer variable acted as an ID - two other variables - a float variable
mytype create_data()
TODO: receive input from user and assign the value of new dataview_data(mytype d)
TODO: view the content of data dedit_data(mytype &d)
TODO: edit the value of data d, the ID must not be modified
add_new_data(mytype database[10], int &n_data, mytype d)
TODO: add the new data d inside the database, the new data will be located at the end of database arrayadd_new_priority_data(mytype database[10], int &n_data, mytype d)
TODO: add the new data d inside the database, the new data will be located at the front of database arrayfind_data(mytype database[10], int n_data, int id_to_find)
TODO: find a data inside the database based on its id the function will return the index of the searched data the function will return -1 if such data is not foundremove_data(mytype database[10], int &n_data, int id_to_delete)
TODO: find a data inside the database based on its id then remove such found data from databaseview_data(mytype database[10], int n_data)
TODO: loop through database and view all data inside databasesort_data(mytype database[10], int n_data)
TODO: sort data inside database
- modify the menu so that user cannot insert two data with the same ID