TUGAS 1 - ALGORITMA DAN PEMROGRAMAN (UT)

Nabila Naurotul
2 May 202409:05

Summary

TLDRIn this video, Nabilaul Umah from the University of Malang demonstrates how to solve a salary calculation problem using flowcharts and pseudocode. The task involves calculating an employee's salary based on their job level (Golongan A, B, or C) and overtime hours. Golongan A receives a salary of 5 million, B gets 6.5 million, and C earns 9.5 million. Overtime pay is calculated as a percentage of the base salary, depending on the hours worked. The video also includes a practical implementation of the algorithm in Java, showcasing how the program takes input and outputs the total salary.

Takeaways

  • πŸ˜€ The task involves creating a flowchart and code to calculate employee salaries based on their job level and overtime hours worked.
  • πŸ˜€ Employees are categorized into three job levels (Golongan A, B, C), each with a different base salary: A = 5 million, B = 6.5 million, C = 9.5 million.
  • πŸ˜€ Overtime pay is calculated based on the number of overtime hours worked, with different percentages applied to the base salary for each condition.
  • πŸ˜€ For 1 hour of overtime, the pay is 30% of the base salary. For 2 hours, it’s 32%, for 3 hours it’s 34%, for 4 hours it’s 36%, and for 5 or more hours, it’s 38%.
  • πŸ˜€ The flowchart starts by taking input for the employee's Golongan (job level) and the number of overtime hours worked.
  • πŸ˜€ After determining the job level, a second condition checks the overtime hours and calculates the overtime pay accordingly.
  • πŸ˜€ The total income is the sum of the base salary and overtime pay.
  • πŸ˜€ The flowchart ends with an output displaying the total income after applying the calculations.
  • πŸ˜€ The script also demonstrates how to implement this logic in Java, including how to handle input and calculate the final salary based on conditions.
  • πŸ˜€ The Java implementation uses conditionals to check the Golongan and overtime hours, then calculates the total salary which is displayed as output.
  • πŸ˜€ The presenter runs an example where the employee selects Golongan A and works 1 hour of overtime, resulting in a total income of 6.5 million, and tries other test cases with different inputs.

Q & A

  • What is the primary task discussed in the script?

    -The primary task is to create an algorithm, flowchart, and corresponding code for calculating employee salaries based on their employee group and overtime hours.

  • How is the salary of employees determined based on their group?

    -The salary is determined as follows: Group A employees earn 5 million, Group B employees earn 6.5 million, and Group C employees earn 9.5 million.

  • How is the overtime pay calculated?

    -Overtime pay is calculated based on the number of hours worked: 30% of the base salary for 1 hour, 32% for 2 hours, 34% for 3 hours, 36% for 4 hours, and 38% for 5 or more hours.

  • What are the inputs required for the flowchart and the code?

    -The inputs required are the employee's group and the number of overtime hours worked.

  • What is the output of the flowchart and code?

    -The output is the total income, which is the sum of the base salary and the overtime pay.

  • How does the flowchart begin?

    -The flowchart starts with the 'start' block, followed by inputting the employee's group and overtime hours.

  • What are the conditions in the flowchart related to employee groups?

    -The flowchart has conditions for three employee groups: Group A (5 million salary), Group B (6.5 million salary), and Group C (9.5 million salary).

  • How is the overtime calculation implemented in the code?

    -The overtime calculation in the code is done using a 'select case' structure where different percentages of the base salary are applied based on the number of overtime hours worked.

  • What happens at the end of the flowchart?

    -At the end of the flowchart, the total income is calculated by adding the base salary and overtime pay, and the result is output.

  • How is the program tested in the script?

    -The program is tested by running it and inputting different employee groups (A, B, or C) and overtime hours to verify that the correct total income is displayed.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Salary CalculationOvertime PayFlowchart DesignJava CodeEmployee SalaryProgrammingAlgorithmBusiness LogicTech TutorialEducational Content