Professional Documents
Culture Documents
Lab Project: Course Title: Problem Solving Lab Course Code: CSE 123 Semester: Summer 2019
Lab Project: Course Title: Problem Solving Lab Course Code: CSE 123 Semester: Summer 2019
::::Course Teacher::::
Masud Rabbani
Lecturer
Dept. of CSE, DIU
::::Prefect::::
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
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.
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.
• 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.
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.
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.
Note: There are credit variation in subjects. So, if you calculate in straight forward manner there may occur wrong answer.
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.
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-
➢ Basic Calculation-
• Addition
• Subtraction
• Multiplication
• Division
• Percentage
➢ Scientific Calculation-
• Logarithm
• Trigonometry
• Square
• Square root
• Equation solver
➢ User Mode:
• Search books
• Book lists
• Borrow Books
• Deposit Books
➢ 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
• Enter Category
• Show CGP
• Edit Info
• Exit.
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
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:
The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.
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:
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.
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.
Output
For every Student Print Student Number, Arrival Time, Counter Entrance Time, Counter Leaving Time and waiting time.
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
Note:
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)
WT = Waiting Time (Amount of time that students waits to in the queue to pay the fees)