Problem Set 9: Structure
Problem Set 8.1: Structure
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
Take user input in this format (x, y) (ex: (1, 2))
Print the Point in this format (x, y)
Is two Point are same
Find Distance between two Points
Find Distance of a Point form the Origin Point in a Cartesian Plane
Test weather three points are Collinear or Non-collinear
Test in which coordinate a Point is belongs to
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
Take user input in this format (x, y, z) (ex: (1, 2, 3))
Print the Point in this format (x, y, z)
Is two Point are same
Find Distance between two Points
Find Distance of a Point form the Origin Point in a Cartesian Plane
Test weather three points are Collinear or Non-collinear
Line
Member Variable: Point1, Point2
Triangle
Member Variable: Point1, Point2, Point3
Rectangle
Member Variable: Point1, Point2, Point3, Point4
ComplexNumber
Member Variable: a (real number), b (imaginary number)
Function
Take user input in this format a+bi (ex: 2+3i)
Print the Complex Number in this format a+bi
Find the Absolute Value of a Complex Number
Find the Conjugate of a Complex Number
Calculate the phase angle of a complex number in radians
Calculate the polar components of a complex number
Find the Addition of two Complex Number
[(a + ib) + (c + id) = (a + c) + i(b + d)]
Find the Subtraction of two Complex Number
[(a + ib) – (c + id) = (a – c) + i(b – d)]
Find the Multiplication of two Complex Number
[(a + ib) * (c + id) = (ac – bd) + i(ad + bc)]
Find the Division of two Complex Number
[(a + ib) / (c + id) = (ac+bd)/ (c2 + d2) + i(bc – ad) / (c2 + d2)]
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
Person
Member Variable: Name, NID, Phone, Email, Date_of_Birth
Course
Member Variable: Course Name, Course Code, Semester, Year
Time
Member Variable: hour, minute, second
Date
Member Variable: day, month, year
DateTime
Member Variable: day, month, year, hour, minute, second
Last updated