You are on page 1of 1

Q1/ Create a class named City that has a method, the method receives a rectangular array of cities for

each governorate and prints them down as below:

Hawler, Shaqlawa, Rwanduz, Khalifan, Soran


Slemani, Dukan, Raniya, Qaladze, Saydsadiq
Duhok, Akre, Zakho, Amedi, Sheladze

Q2/ Create a class named Triangle that has a method, the method receives an integer and uses that
integer to print asterisks to form a triangle like below:

Method parameter = 10

Method output:
**********
*********
********
*******
******
*****
****
***
**
*

You might also like