SlideShare a Scribd company logo
1 of 2
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?
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).

More Related Content

More from alish sha

Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13alish sha
 
Lab 5 2012/2012
Lab 5 2012/2012Lab 5 2012/2012
Lab 5 2012/2012alish sha
 
Purpose elaborate
Purpose elaboratePurpose elaborate
Purpose elaboratealish sha
 
Test 1 alish schema 1
Test 1 alish schema 1Test 1 alish schema 1
Test 1 alish schema 1alish sha
 
Lab 6 sem ii_11_12
Lab 6 sem ii_11_12Lab 6 sem ii_11_12
Lab 6 sem ii_11_12alish sha
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&aalish sha
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&aalish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Attn list test
Attn list testAttn list test
Attn list testalish sha
 
Carry markdam31303
Carry markdam31303Carry markdam31303
Carry markdam31303alish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8alish sha
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7alish sha
 
Dti2143 lab sheet 6
Dti2143 lab sheet 6Dti2143 lab sheet 6
Dti2143 lab sheet 6alish sha
 
Math hquickissential
Math hquickissentialMath hquickissential
Math hquickissentialalish sha
 
Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5alish sha
 

More from alish sha (20)

Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13
 
Lab 6
Lab 6Lab 6
Lab 6
 
Lab 5 2012/2012
Lab 5 2012/2012Lab 5 2012/2012
Lab 5 2012/2012
 
Purpose elaborate
Purpose elaboratePurpose elaborate
Purpose elaborate
 
Lab sheet 1
Lab sheet 1Lab sheet 1
Lab sheet 1
 
Test 1 alish schema 1
Test 1 alish schema 1Test 1 alish schema 1
Test 1 alish schema 1
 
Lab 6 sem ii_11_12
Lab 6 sem ii_11_12Lab 6 sem ii_11_12
Lab 6 sem ii_11_12
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&a
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&a
 
Final project
Final projectFinal project
Final project
 
Final project
Final projectFinal project
Final project
 
Attn list test
Attn list testAttn list test
Attn list test
 
Carry markdam31303
Carry markdam31303Carry markdam31303
Carry markdam31303
 
Final project
Final projectFinal project
Final project
 
Final project
Final projectFinal project
Final project
 
Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7
 
Dti2143 lab sheet 6
Dti2143 lab sheet 6Dti2143 lab sheet 6
Dti2143 lab sheet 6
 
Math hquickissential
Math hquickissentialMath hquickissential
Math hquickissential
 
Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5
 

Lab exercise 1

  • 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).