Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.05 KB

File metadata and controls

29 lines (20 loc) · 1.05 KB

Lab 12

Use GObject to create two classes:

  • Person, with a member variable name
  • Student, a subclass of Person

Create a virtual function person_greet() for each class.

When person_greet() is called with a Person object, print the string "Hello", followed by the name.

When person_greet() is called with a Student object, print the string "Welcome to CSUF", followed by the name.

Create an object of each class and demonstrate that person_greet() produces the correct output for each object.

Create a Makefile for the project, calling pkg-config as appropriate. To avoid warnings from GObject, omit -Wbad-function-cast from CFLAGS.

Note: in order to complete this lab successfully, you will probably need both the readings from the Schedule and some of the code from this object template.