Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Objectives:
After finishing the project, students are expected to be capable of:
Utilizing basic control structures of C/C++ to implement algorithms for specific
problems.
Initializing, manipulating and utilizing arrays / multi-dimensional arrays in
modeling data for solving problem.
Manipulating strings of characters.
Read and write from files.
Instructions
Mini projects are performed individually. Class will be split into teams; however, each
member is responsible for their own assigned questions. At the end of the class, mini
projects are merged by team into one working application.
Each mini project consists of a requirement and smaller questions to guide the
development effort. Try to solve these smaller questions first before tackling the
requirements.
Example:
Matrix has many different uses in science and engineering. For example, they can be
used to solve systems of equations. To make matrix calculation easier, develop a
simple matrix calculator that can perform following operations:
Mini project 1:
Input a matrix from file and check whether it is a diagonal matrix; given that diagonal
matrix is a square matrix with following form:
Mini project 3:
Input a matrix from file (as in mini project 1) and check whether it is a lower triagonal
matrix; given that triangonal matrix has following form:
Mini project 4:
Input a matrix from file (as in mini project 1) and check whether it is a symmetric
matrix; given that symmetric matrix has following form:
Mini project 5:
Input a matrix from file (as in mini project 1) and check whether it is an anti-
symmetric matrix; given that anti-symmetric matrix has following form:
Mini project 6:
Input two matrices from file (each matrix follows the form in mini project 1), perform
the matrix addition between them and write results back to a text file; given that
matrix addition is perform as follow:
Mini project 8:
(Note to lecturer: this question is more difficult than other ones)
Input two matrices from file (each matrix follows the form in mini project 1), perform
the matrix multiplication between them and write results back to a text file.
Matrix multiplication results in a scalar value as follow:
=>
ATM information: atm.txt file with following form. It shows the amount of money bills
that ATM is currently holding.
*Note that user IDs appearing in transaction file match with user ID in account.txt*
Mini project 1:
Provide mechanisms to build user account database and login function. User account
should be input from GUI or console interface and stored in the “account.txt” file with
stated structure. The login function will be performed through GUI or console interface;
and username and passwords will be checked with content in the “account.txt” file.
Bonus: perform the encryption on password by inversing order of text.
Mini project 2:
Provide a function to process the transaction file and calculate the account balance of
each user in the system. Noted that account balance equals to deposit amount minus
withdrawal amount.
Mini project 3:
Assume that account balance of user is sufficient to perform the transfer; provide a
GUI or console interface to let user specify the transfer and store the transaction inside
the transaction file.
Mini project 4:
(Note to lecturer: this is a lengthy and fairly difficult function)
Assume that account balance of user is sufficient to perform the withdrawal; create a
function to perform the withdraw activity. The function must check the requested
Product Information: product.txt. Note that “In-store” equals to the amount of product
available in the warehouse of the store.
Order Information: order.txt. Note that buyer ID matches with user ID in account.txt
and product ID matches with product ID in product.txt. The price of the product at the
time when order is placed is also stored in the order information.
Mini project 2:
Provide mechanisms to add a product into database and list all the products. Product
information should be input from GUI or console interface and stored in the
“product.txt” file with stated structure. Program must be able to list all products in the
product.txt to the user interface on demand.
Mini project 3:
Provide mechanisms to list all products in the database (product.txt file) and allow
user to delete a product from the system.
Mini project 4:
Provide mechanisms to list all products in the database (product.txt file) and allow
user to modify the price and in-store amount of a product.
Mini project 5:
Provide mechanisms to list all products in the database (product.txt file) and allow
users to add products and specify the amount into a new order. This new order must
be stored in order.txt file.
Mini project 6:
(Note to lecturer: This is a lengthy and fairly difficult question).
Provide a mechanism for store owner to modify content of an UNPAID order. Owner
should be able to see content of the order, with the product ID translated into product
information (for example: 1 – 2 – 50000 in order.txt should be shown as “Toy plane –
amount: 2 – price: 50000”). Owner should be able to add and remove items from the
order.
Quiz: quizzes.txt. Note that question IDs match with ID in question list (questions.txt)
Student Solution: solutions.txt. This file store the solution to quizzes submitted by
students. Note that the content has the form <question ID> - <student solution>
Mini project 2:
Provide lecturer the mechanism to list all questions and add new question into the
list. Content of this question can be input from console or from a file.
Mini project 3:
Provide lecturer the mechanism to list all questions and modify an existing question.
Content of this question can be input form console or from a file.
Mini project 4:
Provide lecturer the mechanism to search for a question from test bank using a
phrase and remove it from the database.
Mini project 5:
Provide lecturer the mechanism to list all questions in the database and add them
into new a new quiz.
Mini project 6:
(Note to lecturer: This is a fairly lengthy and complex question)
Provide student a mechanism to answer a quiz. The quiz can only be selected before
the deadline. Submitted quiz cannot be done again. System should be able to show
the question to interface one-by-one and accept solutions from students. The results
are stored in solutions.txt file.
Book title information: booktitle.txt. This file stores information about book titles
available in our library system. Note that this file does not store information about
individual copy of the book in the library.
Mini project 1:
Provide mechanisms to build user account database and login function. User account
should be input from GUI or console interface and stored in the “account.txt” file with
stated structure. The login function will be performed through GUI or console interface;
and username and passwords will be checked with content in the “account.txt” file.
Bonus: perform the encryption on password by inversing order of text.
Mini project 2:
Provide mechanism for library manager to add list all book title available in the system
and add a new title into the list. This list of book title is stored in booktitle.txt file with
stated structure.
Mini project 3:
Provide mechanism for library manager to remove a book title from library, along with
all the books of that title in the library.
Mini project 4:
(Note to lecturer: this is a lengthy and fairly complex problem)
Provide a mechanism to store information about book borrowing. Assume that the
deadline to return a book for every user is two weeks. Each user can only borrow two
Mini project 5:
Provide a mechanism to store information about returning book. After a book is
returned, the corresponding entry in borrow.txt must be updated with “Returned: 1”.
Moreover, if the book is returned after the deadline, a note must be created to show
that user has violated the policy and must be fined.
Mini project 1:
Creare caro board:
Video: https://www.youtube.com/watch?v=rnrNL1CT7TM
(Hint Using panal to create frame…)
Sourcode: http://www.howkteam.vn/course/lap-trinh-game-caro-voi-c-winform/tao-ban-co-game-
caro-c-winform-112
Mini project 2:
Change player:
Video: https://www.youtube.com/watch?v=zLML7SgxJ9M
Hint: how to store current player, change symbol of player…change background image, how
to find image?
http://www.howkteam.vn/course/tao-ban-co-game-caro-c-winform/xu-ly-doi-nguoi-choi-game-
caro-c-winform-113
Mini project 3:
Play game
How to know win/lost? Idea, check?: store all button in a matrix (2D??/ how to check in 2D
matrix?? Difficult? No:) proposal: list in list?? Matix: 17x17: list in list? Index of list to 1D…
each button is stored which row??? https://www.youtube.com/watch?v=fJzhoE1NEr4
Source code: https://www.howkteam.vn/course/xu-ly-doi-nguoi-choi-game-caro-c-
winform/xu-ly-thang-thua-game-caro-c-winform-114
Mini project 4:
Timer countdown
How to use process bar? Combine time? How to use event?
https://www.youtube.com/watch?v=ebCGjYEnp4E
Source code: http://www.howkteam.vn/course/xu-ly-thang-thua-game-caro-c-winform/dem-
nguoc-thoi-gian-game-caro-c-winform-116
Mini project 5:
Create menu and Hotkey:
Mini project 6:
Undo task
Video: https://www.youtube.com/watch?v=OiMgB8RIqtU
How to store in stack?
Change player when active undo.
Sourcode: https://www.howkteam.vn/course/chuc-nang-di-lai--undo-trong-game-caro-c-
winform/chuc-nang-di-lai--undo-trong-game-caro-c-winform-118
Mini project 7:
Setup connect client and server and transmit a simple message
Video: https://www.youtube.com/watch?v=cEakhhjvP0k
How to check connection, transmissiont? IPv4? How to import library?using ipconfig to get
ip?
Using SerializeData store string in byte (memoryStream) return bytearray
Using DeserializeData byte array to object.
SocketManager: create IP address, Port (iep), AddressFamily, SocketType, how to use try
catch …connect
Socket Server: server.bind(iep), listen(10), thread acceptClient( client=server.accept
create private link not public: …) using Thread( argument is object and return void)
accept.Clinet.IsBackground…. .Start…
Client connect: using public bool
Server connect
Private bool SenData (socket, byte): return target.Send(data)==1? true:false;
Private bool ReceiveData()
Source code: https://www.howkteam.vn/course/chuc-nang-di-lai--undo-trong-game-caro-c-
winform/tao-ket-noi-lan-2-nguoi-choi-game-caro-winform-120
Mini project 8:
Transmit chess in LAN: client to server and vice versa.
Transmit locate (x,y) client to server board’s server
Transmit locate (x,y) server to client client’s server
Video: https://www.youtube.com/watch?v=sFO59FuDtng
Source code: https://www.howkteam.vn/course/tao-ket-noi-lan-2-nguoi-choi-game-caro-
winform/hien-thi-quan-co-doi-phuong-mang-lan-game-caro-c-winform-121
Project 8:
Genetic algorithms
The objective of this algorithm is to provide optimisation over large space state. Unlike
traditional AI, they do not break on slight change in input or presence of noise. Application of
GA is: recurrent Neural Network, Mutation testing, Code breaking, Filtering and signal
processing, Learning fuzzy rule base
Mini project 1:
Fitness Score [https://www.geeksforgeeks.org/genetic-algorithms/]
A Fitness Score is given to each individual which shows the ability of an individual to
“compete”. The individual having optimal fitness score (or near optimal) are sought.
Mini project 2:
Asymptotic Analysis and comparison of sorting algorithms
[https://www.geeksforgeeks.org/asymptotic-analysis-comparison-sorting-algorithms/]
The compared following algorithms: 1.Insertion sort: The traditional algorithm with
no modifications/optimisation. 2.Merge sort: the divide-and-conquer approach. For
input sizes of the order 10^5 this algorithm is of the right choice. It renders insertion
sort impractical for such large input sizes. 3. Combined version of insertion sort
and merge sort. 4.Quick sort: This is the library function qsort() which is available,
etc.
Project 9:
Linked list [https://www.geeksforgeeks.org/data-structures/linked-list/]
Mini project 1:
Singly Linked list
Mini project 2:
Circular Linked list
Mini project 3:
Doubly Linked List
Mini project 4:
Misc
Mini project 5:
Quick Links
Mini project 3:
Blur an image [https://www.geeksforgeeks.org/opencv-c-program-to-blur-an-image/]
Mini project 4:
PortScanner [https://www.geeksforgeeks.org/creating-a-portscanner-in-c/]