COMPLETE! COS2614 Summary (Programming: Contemporary Concepts)
c++ general summary: Creating class in QT: Right click on your project, say add new, then chose class. Then just type in class name and header and cpp file will automatically be created for you. Also, right click on a function and go refactor, then go add definition in .cpp file then it will create an auto implementation for you. General theory: Partial overriding: To implement an overridden function using partial overriding that means we call the overridden function in the overwriting function to calculate something. E.g. say calculateRental() was overridden double Video::calculateRental(int num) const{ double rental = Film::calculateRental(num); //calling the overridden function return (rental - (rental * discount / 100)) ; } Features of QMainWindow that allows for QAction objects: QMenu and QToolBar setCentralWidget(QWidget *wt) Note this function takes a QWidget object, but you can add view classes object inside as argument since the view class derived from QDialog or QMainWindow and those classes derive from QWidget. You can also put widgets like button as central widget since buttons derive from Viewclass which derive from QDialog which derives from QWidget. 3 visible features that can be added to QAction(sub menus) Text, icon, shortcut, tooltip Destructor when QMap and QList are data members
Geschreven voor
- Instelling
- University of South Africa
- Vak
- COS2614 - Programming: Contemporary Concepts
Documentinformatie
- Geüpload op
- 7 oktober 2021
- Aantal pagina's
- 92
- Geschreven in
- 2021/2022
- Type
- Tentamen (uitwerkingen)
- Bevat
- Vragen en antwoorden
Onderwerpen
-
cos2614
-
complete cos2614 summary programming contemporary concepts