Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Lab Project

Course Title: Problem Solving Lab


Course Code: CSE 123
Semester: Summer 2019

::::Course Teacher::::
Masud Rabbani
Lecturer
Dept. of CSE, DIU

::::Prefect::::

Atiqur Rahman Hasan Moon Tanima Hossain Mehedi Hasan


Student of DIU Student of DIU Student of DIU Student of DIU
Id: 172-15-9866 Id: 172-15-9768 Id: 181-15-10733 Id: 172-15-9804
Mail: atiqur15- Mail: hasan15- Mail: tanima15- Mail: mehedi15-
9866@diu.edu.bd 9768@diu.edu.bd 10733@diu.edu.bd 9804@diu.edu.bd

Dept. of CSE, Daffodil International University Page 1


Project -1: Base Conversion

Mainly there are four types of number system. Decimal, Binary, Octal and Hexadecimal. Binary is 2 base number,
Octal is 8 base, Decimal is 10 base and Hexadecimal is 16 base. All the numbers of specific base are given below.

❖ Binary = 0 1
❖ Octal = 0 1 2 3 4 5 6 7 8
❖ Decimal = 0 1 2 3 4 5 6 7 8 9
❖ Hexadecimal = 0 1 2 3 4 5 6 7 8 9 A B C D E F

✓ Your task is to convert between all of these number systems.

Requirement and specification:

At first console will be shown following tasks. Then user will be prompt to select any of these.

• Binary To octal
• Binary to decimal,
• Binary to hexadecimal
• Octal to binary
• Decimal to binary
• Hexadecimal to binary
• Octal to Decimal
• Octal hexadecimal
• Decimal to hexadecimal
• Decimal to octal
• Hexadecimal to decimal

1. When user selects any of these items user will be prompt again to enter number
2. Then the number will be converted and printed following format-
“Decimal To binary: 100d = 01100100b”
3. When user presses 0 then program will be terminated, otherwise it will continue.

Dept. of CSE, Daffodil International University Page 2


Project -2: Personal Assistant

Mr. Dablu is a very busy person. He always forgets his daily task. He can’t remind anything. Some days ago, he forgot to
attend a very important meeting. Which ran into a catastrophic situation in his life. You are to help him to solve this
problem. Build a personal assistant for Mr. Dablu.

Requirement and specification:

• Add task
• Update Tasks
• Complete Task
• Cancel Task
• Check Upcoming task
• Check tasks of specific date
• Check Completed tasks.

➢ When user press Add task, he will be prompt to enter date and task information.
➢ Then user will be able to update, cancel, check the tasks. He will able to flag the task which has been done.

Project -3: Text Editor


Normally we input any data using scanf() in C programming language. But think about one thing. If you have to input
1000000 data and do it multiple times then is it possible to make it using scanf()? The Answer is yes! But it will take very
long time that is very impractical. This kind of thinking is Incomprehensible to programming philosophy.

But there is a nice alternative. You can write all the number in a text file and use it in program as much as you need.
Anyway, in this problem you have to read and write file using programming.

Requirement and specification:

• Open a text File


• Read File
• Edit File (Make necessary changes)
• Save
• Delete
• Exit

Dept. of CSE, Daffodil International University Page 3


Project -4: Result Generator

Suppose, there are 45 students in your class. Input the marks of all subjects and show the grade of students after required
calculation. Subjects and credit are shown below.

Course Course Credi Resul


Code Title t t
MAT 121 Mathematics – II: Linear Algebra and Coordinate Geometry 3

CSE 122 Programming and Problem Solving 3

CSE 123 Problem Solving Lab 1

PHY 123 Physics - II: Electricity: Magnetism and Modern Physics 3

PHY 124 Physics - II Lab 1

ENG 123 Writing and Comprehension 3

Requirement and specification:

You have to do the following task for every student-

• Input the marks against all subject.


• Do required calculation
• Show the students ID and the grade
• Sort the students according to the grade
• Count how much students got which grade

Note: There are credit variation in subjects. So, if you calculate in straight forward manner there may occur wrong answer.

Dept. of CSE, Daffodil International University Page 4


Project -5: Currency Converter

Currency is a system of money in general use in a particular country. There are lots of currency in the world i.e. BDT, USD,
AUD, SGD, BND etc. The rate of these currency is not same. Your task is simple. Convert between all possible currencies in
the world.

Requirement and specification:

1. User will be shown all possible conversion system and prompt user to select any of these.
2. Input the amount of money
3. Shows the result after required calculation
4. Sort the all currency according to its rate in following format-

“1. Bangladesh BDT”

“2. India Rupee”

Project -6: Calculator


Mainly there are two types of calculator. One is basic calculator which can only perform addition, subtraction,
multiplication and divide. Another is scientific calculator which can calculate temperature, logarithm, trigonometry and
others mathematical and scientific issues. In this project you have to build a scientific calculator. Project requirement and
specification is given below.

Requirement and specification:

➢ Basic Calculation-
• Addition
• Subtraction
• Multiplication
• Division
• Percentage

➢ Scientific Calculation-
• Logarithm
• Trigonometry
• Square
• Square root
• Equation solver

Dept. of CSE, Daffodil International University Page 5


Project -7: Library Management
A library is a collection books. Rigan have a library. Students borrow books from the library and return after a particular
time. Sometimes he got confused how much books he has at a particular time. It is quite impossible to check which books is
available at a particular time. It’s you to solve this problem. You have to built a library management system.

Requirement and specification:


➢ Admin Mode:
• View Books
• Add Books
• Search book by Category/By name
• Total Books

➢ User Mode:
• Search books
• Book lists
• Borrow Books
• Deposit Books

Project -8: Movie Theater Management


Consider about Star Cineplex. Everyday some people come to watch movie, some people come to buy advance ticket, new
movie arrive, old movies discarded from the list. So, management is a big issue. Suppose you are given the responsibility to
manage it. As you are very smart and know the programming you can simply make it, can’t you?

Requirement and specification:

➢ Admin Mode
• Login
• Add movie
• Set show time
• Delete movie etc.
• Logout

➢ Customer Mode:
• Watch show time
• Ticket price
• Buy a ticket
• Customer can also
• sign up
• Login
• Logout

Dept. of CSE, Daffodil International University Page 6


Project -9: Student Management
Suppose you are the owner of XYZ kindergarten school. As an educational institution It’s mandatory to keep information of student’s
admission, Exam information, Student marks, student personal profile and others relevant information’s. As you are smart and know
the programming it’s time to bet the traditional “KHATA KOLOM SYSTEM” system. So, let’s go.

Requirement and specification:

• Enter Category

• Search Student Info

• Add Student info

• Delete Student Info

• Show Student Details

• Add Exam marks

• Show CGP

• Edit Info

• Exit.

Project -10: MCQ Quiz App


Now a day’s multiple-choice question (MCQ) is very popular because of its ease of use. Evaluation is very easy in this system and the
exam can be taken from any place and anytime. Your task is to create MCQ Quiz app which will show the user a set of question and
user will be able to participate in the examination.

Requirement and specification:

a. Show the question set and prompt user to type answer

b. After answering all the questions user will be shown total marks he obtained.

c. Exit the program when user types 0 and play again if he types 1

Dept. of CSE, Daffodil International University Page 7


Project- 11: Pattern Recognition

Write a program that tests whether a two-dimensional array has four consecutive numbers of the same value, either horizontally,
vertically, or diagonally. The program will prompt the user to enter the number of rows and columns of a two-dimensional array
and then the values in the array and displays true if the array contains four consecutive numbers with the same value. Otherwise,
display false. Here are some examples of the true cases:

Project- 12: Tic Tac Toe


Tic-tac-toe is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid.

The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.

The following example game is won by the first player, X:

Players soon discover that best play from both parties leads to a draw. Hence, tic-tac-toe is most often played by young children.
Because of the simplicity of tic-tac-toe, it is often used as a pedagogical tool for teaching the concepts of good sportsmanship and
the branch of artificial intelligence that deals with the searching of game trees. It is straightforward to write a computer program to
play tic-tac-toe perfectly, to enumerate the 765 essentially different positions or the 26,830 possible games up to rotations and
reflections (Wikipedia)
Let’s build the the game.
Requirement and specification:

Go this links for details- https://goo.gl/dRiNee

Dept. of CSE, Daffodil International University Page 8


Project- 13: Bore Reducer

Think about the account section of Daffodil International University. During payment of tuition fees boys and girls are permitted only
two separate queues. One for boys and another for girls. That means boys and girls has only one counter. It’s maybe sufficient for
girls. But during the time of instalment boys queue is so much congested that the queue becomes very long and it almost blocks the
entrance and exit path. Due to only one counter, students have to wait very long time to pay the Tuition fees. There is also another
problem. Time spend at counter are not same for all student. Sometimes it is very boring.

Your task is very simple. Input the arrival time and amount of time that a student spends on counter, we call it service time. Then
for every student print the following task for every student.

1. When the Student will reach at counter,

2. when he will leave counter,

3. Total waiting times taken to reach the counter.

Input

First line of the input contains the number of Student S(10<=S<=100) denoting the total number of student. Next S lines contains two
space separated integers AT and ST denoting arrival time and service time on the counter.

Remember, Arrival time must be non-decreasing order.

Output

For every Student Print Student Number, Arrival Time, Counter Entrance Time, Counter Leaving Time and waiting time.

Dept. of CSE, Daffodil International University Page 9


Sample Input:

10

05

16

37

46

57

68

95

13 4

15 8

19 7

Sample Output:

St AT ST CE SL WT
1 0 5 0 5 0
2 1 6 5 11 4
3 3 7 11 18 8
4 4 6 18 24 14

5 5 7 24 31 19
6 6 8 31 39 25
7 9 5 39 45 30
8 13 4 39 43 26
9 15 8 43 51 28
10 19 7 51 58 32
Total Waiting Time: 186

Dept. of CSE, Daffodil International University Page 10


Hint: Accounts opens at 9.00 and closes at 5.00. That means it remains open 8 hours or 4800 minutes.

The working time of the accounts is 0 to 4800 minutes.

Note:

AT = Arrival Time (When Students stands at the queue)

CE = Counter Entrance Time (When students get chance to pay the fees/Enter the counter)

ST = Service Time (Amount of time that a student passes in the Counter/Amount of Time to pay the fees)

SL = Student Leave (When students leave the counter)

WT = Waiting Time (Amount of time that students waits to in the queue to pay the fees)

Requirement and specification:

Take Input from file

Dept. of CSE, Daffodil International University Page 11


Special Thanks to our honorable Teacher
to create the project manual.
Dr. Sheak Rashed Haider Noori
Associate Professor
&
Assistant Head of
Department of Computer Science

Dept. of CSE, Daffodil International University Page 12


‘Happy Coding’

Dept. of CSE, Daffodil International University Page 13

You might also like