# Problem Set 9: Structure

## Problem Set 8.1: Structure

1. 2dPoint
   * Member Variable: x, y
   * Member Variable: x, y (Here, x and y are the X and Y axis coordinate respectively in a Cartesian Plane)
   * Function
     1. Take user input in this format (x, y) (ex: (1, 2))
     2. Print the Point in this format (x, y)
     3. Is two Point are same
     4. Find Distance between two Points
     5. Find Distance of a Point form the Origin Point in a Cartesian Plane
     6. Test weather three points are Collinear or Non-collinear
     7. Test in which coordinate a Point is belongs to
2. 3dPoint
   * Member Variable: x, y, z (Here, x, y and z are the X, Y and Z axis coordinate respectively in a Cartesian Plane)
   * Function
     1. Take user input in this format (x, y, z) (ex: (1, 2, 3))
     2. Print the Point in this format (x, y, z)
     3. Is two Point are same
     4. Find Distance between two Points
     5. Find Distance of a Point form the Origin Point in a Cartesian Plane
     6. Test weather three points are Collinear or Non-collinear
3. Line
   * Member Variable: Point1, Point2
4. Triangle
   * Member Variable: Point1, Point2, Point3
5. Rectangle
   * Member Variable: Point1, Point2, Point3, Point4
6. ComplexNumber
   * Member Variable: a (real number), b (imaginary number)
   * Function
     1. Take user input in this format a+bi (ex: 2+3i)
     2. Print the Complex Number in this format a+bi
     3. Find the Absolute Value of a Complex Number
     4. Find the Conjugate of a Complex Number
     5. Calculate the phase angle of a complex number in radians
     6. Calculate the polar components of a complex number
     7. Find the Addition of two Complex Number
        * \[(a + ib) + (c + id) = (a + c) + i(b + d)]
     8. Find the Subtraction of two Complex Number
        * \[(a + ib) – (c + id) = (a – c) + i(b – d)]
     9. Find the Multiplication of two Complex Number
        * \[(a + ib) \* (c + id) = (ac – bd) + i(ad + bc)]
     10. Find the Division of two Complex Number
         * \[(a + ib) / (c + id) = (ac+bd)/ (c2 + d2) + i(bc – ad) / (c2 + d2)]
     11. Find the Power of Iota (i) \[i^n, where n>=0]
         * i^0 = 1
         * i^1 = i
         * i^2 = -1
         * i^3 = -i
         * i^4 = 1
7. Person
   * Member Variable: Name, NID, Phone, Email, Date\_of\_Birth
8. Course
   * Member Variable: Course Name, Course Code, Semester, Year
9. Time
   * Member Variable: hour, minute, second
10. Date
    * Member Variable: day, month, year
11. DateTime
    * Member Variable: day, month, year, hour, minute, second

