Module/Course Title: Algorithm and Programming Lab

Module course code

KOMS120206

Student Workload
39.67 hours

Credits

1 / 1.5 ETCS

Semester

2

Frequency

Even Semester

Duration

16

1

Type of course

Core Study Courses

Contact hours


45.33 hours of lab activities

Independent Study

Class Size

30

2

Prerequisites for participation (if applicable)

-

3

Learning Outcomes

  1. Students can demonstrate systematic thinking in analyzing and designing software and database solutions
  2. Students can apply effective methods in developing software and databases
  3. Students can create and evaluate software and database solutions
  4. Students can demonstrate skills to use the compiler.
  5. Students can demonstrate skills to design appropriate algorithms for common cases in the programming world.
  6. Students can demonstrate skills to convert algorithms into programs.
  7. Students can demonstrate skills to use the tools and functions provided by the compiler appropriately to solve cases.
  8. Students can demonstrate skills to build efficient programs.

4

Subject aims/Content

This course is a practicum course, where students will do a practicum based on the given practicum modules. In this course, the practicum is designed to apply the theories obtained in the Algorithm and Programming courses in an integrated manner based on cases. The theories applied to the practicum include the basic structure of computer programs, data types and variables, input and output, operations in programming consisting of arithmetic operations, logical operations, and bitwise operations, string operations, branching, looping, pointers, array, record/struct, function, parameter passing, recursion, file operation, and library file creation. These theories are designed to fit into the practicum module, and form a case. To be able to take this course, students must have passed the Algorithm and Programming course.

Study Material

Program structure and programming basics

Case: Create a calculator program that can be executed from the Command Prompt with the arguments of the operand and the operation being performed.

Branching.

Case: Create a program to determine whether a year is a leap year or not.

Arrays and Loops.

Case: Write a program to find the inverse of a matrix using elementary row operations.

Algorithm design and implementation I.

Case:

Make a program to know Panca Wara, Sapta Wara, and Wuku from a date.
The user enters a date, then the program issues information in the form of Panca Wara, Sapta Wara, and Wuku on that date.
For students who do not understand what is meant by Panca Wara, Sapta Wara, and Wuku, please ask their friends who already understand.

Structs, arrays, loops.

Case:

Create a program that can input/add, edit, delete and display student data consisting of: Student ID Number, name, gender, year of birth, year of admission, and GPA!
The program can display data for all students, or only one student based on the Student ID Number entered by the user, if there is a student with the Student ID Number entered. If there is no student data with the Student ID Number entered, the program displays a notification that the student with the Student ID Number does not exist.

Structs, arrays, loops.

Case:

Create a program that can input/add, edit, delete and display student data consisting of: Student ID Number, name, gender, year of birth, year of admission, and GPA!
The program can display data for all students, or only one student based on the Student ID Number entered by the user, if there is a student with the Student ID Number entered. If there is no data on the student with the Student ID Number entered, the program displays a notification that the student with the Student ID Number does not exist.

Design and implementation of algorithm part II , input/output, string operations

Case:

first program.

Create a program to parse user input.

For example, the user enters the input string as follows.
"Ball, book, pencil, bag, hat"
Without quotes.
Then the program must be able to separate words separated by commas, so that the input will get 5 separate words, without commas.
The obtained words can be entered into an array.
So from the sampled input, you will get 5 strings, namely:
"Ball"
"book"
"pencil"
"bag"
and
"hat"
All without quotes.


second program.
The second program is similar to the first program, only, in the second program the input is a string containing several numbers separated by spaces. The program must be able to produce output in the form of the sum of all the numbers in the input string.
Example.
Inputs:
25 7 40 250 35
Outputs:
357

Algorithm II design and implementation, input/output, string operations

Case:

first program.

Create a program to parse user input.

For example, the user enters the input string as follows.
"Ball, book, pencil, bag, hat"
Without quotes.
Then your program must be able to separate words separated by commas, so that from the input you will get 5 separate words, without commas.
The retrieved words can be put into an array.
So from the sampled input, you will get 5 strings, namely:
"Ball"
"book"
"pencil"
"bag"
and
"hat"
All without quotes.


second program.
The second program is similar to the first program, only, in the second program the input is a string containing several numbers separated by spaces. The program must be able to produce output in the form of the sum of all the numbers in the input string.
Example.
Inputs:
25 7 40 250 35
Outputs:
357

File operations, input/output, string operations, structs, arrays.

Case:

1. Write a program to read a .csv file and put the data in an array of structs. The data type of the struct must be correct.

2. Write a program to save data in the form of a .csv file.

.csv files for materials can be created in Microsoft Excel.

File operations, input/output, string operations, structs, arrays.

Case:

1. Write a program to read a .csv file and put the data in an array of structs. The data type of the struct must be correct.

2. Write a program to save data in the form of a .csv file.

.csv files for materials can be created in Microsoft Excel.

File, struct, array operations

Make a program like in the 5th Practicum Module, only, this time the data is stored in a binary file.
Programs can create and process new data/files or process data on existing files.

File, struct, array operations

Make a program like in the 5th Practicum Module, only, this time the data is stored in a binary file.
Programs can create and process new data/files or process data on existing files.

Bitwise Operation

Case:

Write a program to display the binary form of an integer, using bitwise operations!
The integer number is input by the user.

File operations, Bitwise operations.

Case:

Write a program to process Windows 24 bit .BMP image files.
The program can do the following.

1. Create a negative version of the image file from the original.
2. Create a greyscale version of the image file from the original.
3. Swap the red component with the blue component.
4. Increase image brightness.

File operations, Bitwise operations.

Case:

Write a program to process Windows 24 bit .BMP image files.
The program can do the following.

1. Create a negative version of the image file from the original.
2. Create a greyscale version of the image file from the original.
3. Swap the red component with the blue component.
4. Increase image brightness.

Recursion function

Case:

Write a program to display permutations of numbers recursively

5

Teaching methods

Practice

6

Assesment Methods

Practical assessment rubric

7

This module/course is used in the following study programme/s as well

Computer Science Study Programme

8

Responsibility for module/course

  • I Ketut Purnamawan, S.Kom.,M.Kom.
  • NIDN : 0011057903

9

Other Information

  1. The C++ Programming Language, 4th Edition, Bjarne Stroustrup,  Addison-Wesley Professional, 2013.
  2. The GNU C Reference Manual: "https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html"
  3. C Referencce: "https://en.cppreference.com"
  4. Standard C++ Library reference: "https://cplusplus.com/reference/"
  5. C Tutorial: "https://www.tutorialspoint.com/cprogramming/index.htm"