Professional Documents
Culture Documents
Lab 4
Lab 4
LAB: 04
General notes:
● Each exercise is a separate project and should be saved in a
different folder. The name of the folder is the exercise number.
● Write your name, ID, and PC number as a comment on the
main class.
● Zip your folders into one folder and upload your answer to the
blackboard before the end of the class. Late submission is
considered absent.
Exercise 1:
A. Write a class City which contains the following data and methods:
Data:
● Name (string)
● Population (integer)
Methods:
● Get and set for each data item
● Print City Info
B. Write a class Node which contains the following data and methods:
Data:
● Data (City)
● Next (Node)
Methods:
● Get and set for each data item