Skip to content

Repository files navigation

Object-oriented Programming, Semester 1, HCMUS

Introduction:

This repo contains some of my OOP assignments and projects. More exercises for practice will be added in the future . . .

NOTE: I'm not sure whether my program is working properly, perhaps there are a few logical bugs, please feel free to contact me or open issues to fix these bugs. Thank you so much!

PLEASE GIVE MY CREDIT OR MENTION ME @teddythinh WHEN USING. THANKS !☺️☺️☺️

Language uses:

C++

Contribution:

Contributions are encouraged. Simply contact me via email or any of the social media platforms listed in my profile. Thanks!

Contents:

Homework and exercises:

NumberContextDescription
1Properties, Constructors, BehavioursCreate Getters, Setters, Constructors, Methods. (Beginner should know this)
2Dynamic ArrayUse class to create a dynamic array.
3DiceCreate a dice to roll from 1 to 6 points, calculate the total points.
4Phone Number GeneratorGenerate some phone numbers with mobile network operators.
5Vietnamese Fullname GeneratorGenerate male and female Vietnamese fullname using some popular available first, middle, last name in Vietnam.
6Email Generator Using Vietnamese Fullname GeneratorGenerate email with the first character of Vietnamese names and some domain names.
7Ho Chi Minh Address GeneratorGenerate Ho Chi Minh city's addresses with available street names, wards, districts.
8Birthday GeneratorGenerate some birthdays with "The 12 Months of the Year" rules.
9Citizen ID GeneratorGenerate some Citizen IDs with the given format.
10Point 3DCreate a 3D Point inherited from 2D Point, request user to input the valid point and save to the file.
11Fractions to lowest termRead file, calculate and change the fractions to the lowest term, to decimal and to percentage.
12Fractions DisplayGenerate random fractions, calculate and change the fractions to the lowest term, to decimal and to percentage.
13Fractions Keyboard InputInput the fractions, calculate and change the fractions to the lowest term, to decimal and to percentage.
14Calculate Perimeter And Area Of 3 ShapesCreate 3 shapes: rectangle, circle and triangle using inheritance, read the attributes of 3 shapes and calculate perimeter and area of each shapes.
15Factory, Singleton, Prototype, Pool design patternsThe concept is the same as exercise 14 but using Factory, Singleton, Prototype, Pool design patterns.
16Soldier game hiting each otherMake a game with 3 champions, create 2 teams, decide which team plays first.
17Check Prime number and Perfect numberCheck if number is prime or number is perfect or not and use regex to check if user input right number or not. (I commented what is a perfect number in the code)

Projects:

NumberContextDescription
1Project Student generatorMy first project is about read file, generate student with names, gpa, addresses, birthdays, phone numbers, emails. (Applying Three-tier Architecture or Three Layered Architecture)
2Project Employees SalaryMy second project is about read file, using inheritance to manage employees, and calculate their salary. (Applying Factory, Singleton, Prototype, Pool design patterns)