JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
programming
1. BTCS 1213
PROGRAMMING FUNDAMENTAL
MEMBER’S NAME:
1. MUHAMMAD AFIQ BIN ABDUL RAHMAN
2. NURULJANNAH BINTI AB SAMAT
3. NUR’AFIQAH BINTI ABDUL AZIZ
2. INTRODUCTION
• Waves can be form by two ways which is by
moon gravitational pull or by wind.
• The highest point of a wave is the crest and the
lowest point is the through.
• The difference between the two is known as the
wave height.
• The principle of superposition of waves states
that when two or more waves are incident on the
same point, the total displacement at that point
is equal to the vector sum of the displacements
of the individual waves.
• Wave interference can be constructive or
destructive in nature.
3. OBJECTIVES
• To creat the FILA table for the problem based
learning(PBL)
• To familiarize with C programming control
structure.
• To create the program from the task given.
• To create a flowchart based on software
requirement.
• To perform programming by creating a flowchart.
• To work effectively in given task in group.
5. PROCEDURE
• 1. Create software to run the requirement for task that is given, which is:
• Estimate of the maximum wave height of the combined waves. Write a
program that will allow the user to enter the period (s) and the wave
height of two waves. Compute 200 points of the sum of the two waves.
• Hint: Include Math.h library in your source file.
• 2 Draw the flowchart to know the flow of your software.
• 3 Based on the flowchart; write the program in C-Free.
• 4 Compile or build the project and run the program.
• 5 Test the program by entering the appropriate input from keyboard.
6.
7.
8. BLOCK DIAGRAM
Period 1
Length1 = 5.13*T1^2
wave 1
Height 1 Wavelength
Length2 = 5.13*T1^2
PROGRAM
Height 2
wave 2
Max wave height of the combination
Period 2 from two waves
9. START
printf : Enter integer wave period(s) and wave height(feet)
printf : For wave 1
printf : Enter integer wave period(s) and wave height(feet)
printf : For wave 2
printf : Wavelengths(feet) are: Length1,Length2)
C
F Length1 = 5.13*T1*T1;
Length2 = 5.13*T2*T2;
H New_period = T1*T2;
L Time_incr =New_period/200;
A1 = Height1/2
A A2 = Height2/2
Freq1 = 1/T1
O Freq2 = 1/T2
R
W For (C=0; C<=199; C++)
T T = C*Time_incr;
W1 = A1*sin(2*pi*Freq1*T)
W2 = A2*sin(2*pi*Freq2*T)
FALSE
if (Sum > Maxwave)
YES
Sum = Maxwave
New_height = Maxwave*2;
END
13. We use #include<stdio.h>, #include <math.h> and
#define PI 3.141593
D Declare variables “int k” and “double” .
determine and print wavelength by formula given;
I Length1 = 5.13*T1^2
S Length2 = 5.13*T2^2
C For compute 200 points of the sum of the two
U waves and estimate of the maximum wave height of
the combined, we use the formula;
S W1 = Vp1*sin(2*PI*Frequency1*t);
S W2 = Vp2*sin(2*PI*Frequency2*t);
I Sum = W1 + W2;
O
N
14. CONCLUSION
• After this project we are able to create the new program
based on the given problem. We also are able to know
more about how to used a C free 4, besides be more
familiar with the C programming control structure.
• On the other hand, we should learn how to creat the FILA
table for the problem based learning(PBL). And also about
action plan is about team discussion.
• To create the program from the task given and also to
create a flowchart based on software requirement. We also
know to perform programming by creating a flowchart.