OOP(Object Oriented Programming), is the three-lettered magical concept on which almost all modern programming language stands. SWIFT…