1. UNIVERSITI TUN HUSSEIN ONN MALAYSIA
FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING
BTI 1022: COMPUTER PROGRAMMING
LAB EXERCISE 1
1. Explain the concept of computer programming
2. Compare below programming languages and give the reasons why it suitable
to be used in such application(s):
Language Application area
FOTRAN Scientific programming
C System programming
C++ Supports objects and object-oriented programming
Java Supports object oriented, Web and mobile programming
3. Determine the input(s) and output(s) for the following:
a. Given the radius of a circle, find the circumference.
b. Given two real numbers, A and B, calculate a sum (A+B), a difference (A-B),
a product (A*B) and the quotients A/B and B/A
c. To prevent and treat osteoporosis, doctor’s recommends use of calcium, 1.5 g/
day. If the patient’s dietary intake is inadequate, one dose of calcium should
be added. How many grams does the patient consume in one week?
4. Clearly specify and analyze the following problems
a. A diagram shows a spring with 40 kg load and has stretch 10 mm. Determine
the spring constant, k?
2. b. In order to pull downward with the hand the triceps muscle pulls on the top of
ulna. Find the force exerted by the hand at 14 inches from the joint in the
elbow, if the triceps pulls with a force of 50 lb at 1 inch from the joint as
shown in the picture.
5. Write down (design) the step to solve problem 3(a).