Mini Project 7: Particles

link to the codes: here

In this mini project, I used the concept of a flower. The Chinese character “花” is in the center of the shape of flower, while the petals radiate from the center.

Coding:

Reflection:

  • What is Object-Oriented Programming (OOP), a Class and an Instance of the Class?

Object-oriented programming (OOP) is a programming paradigm based on the concept of “objects”, which can contain data and code. A class is a grouping of related data and subroutines. As stated in the slides, “A class is like a cookie cutter. Objects are the cookies made by a class.”

  • Discuss the effectiveness of OOP. When is OOP useful? In what way can it be utilized?

To organize properties in chunks thus not only chunks don’t influence each other but it also allows the operations less trivial when it comes to repeating the same patterns.

  • Describe the objects you have created. What properties and methods were implemented? What kind of behaviors did you create by manipulating them?

Within the class, I used constructor, move and display. I also added the for loop onto the class to repeat the petals, with every petal rotating by a certain different degree.

  • Please share it if there is any challenging and confusing aspect(s) in the OOP concepts and techniques

When I use both the for loop and OOP techniques, it’s hard to capture which one shape is the “original” compared to others that kind of derive from the “original”. It’s important because my operations are initially on the “original” one.

Leave a Reply

Your email address will not be published. Required fields are marked *