Đã hoàn thành

need a programmer

Consider the pseudo-code below for computing insurance premium.

(i) Draw the program graph

(ii) Compute the cyclomatic complexity

(iii) Derive a set of basis paths that can be used to test the program

(iv) Given that the baseRate is $500.00, create the test cases that will exercise all the branches for switch case C4 only. The test cases should show the inputs, the path taken and the expected output. [Hint: There should be only two test cases.]

1 program compute_insurance_premium()

2 integer driverAge, points

3 real baseRate, premium

4 Input(baseRate, driverAge, points)

5 safeDriveFactor = 0.0

6 premium = 0.0

7 switch (driverAge) {

8 case C1: 16 <= driverAge < 25

9 ageFactor = 3.0

10 if points < 2 then

11 safeDriverFactor = 40

12 end if

13 break; // End Case – C1

14 case C2: 25 <= driverAge < 45

15 ageFactor = 2.2

16 if points < 3 then

17 safeDriverFactor = 40

18 end if

19 break; // End Case – C2

20 case C3: 45 <= driverAge < 65

21 ageFactor = 1.5

22 if points < 5 then

23 safeDriverFactor = 80

24 end if

25 break; // End Case – C3

26 case C4: 65 <= driverAge < 100

27 ageFactor = 2.0

28 if points < 2 then

29 safeDriverFactor = 120

30 end if

31 break; // End Case – C4

32 default:

33 Output("Driver age out of range.")

34 } //End switch

35 premium = baseRate * ageFactor - safeDriverFactor

36 Output(premium)

Kĩ năng: Thuật toán, Lập trình C, Kĩ thuật, Java, SQL

Xem nhiều hơn: how much does it cost to hire a programmer, hire freelance programmer, i need a computer programmer, need a programmer for a startup, how to find a computer programmer for a startup, how to hire a programmer for a startup, best place to hire a programmer, hire a programmer to make an app, need programmer clone http wwwspreadshirtcom, company need programmer, need programmer ninjatrader strategy programming, idea project need programmer, freelance need programmer, need programmer myspace page, need programmer create simple shopping cart

Về Bên Thuê:
( 121 nhận xét ) Calcutta, India

ID dự án: #14847125

Được trao cho:


Hello, I love programming and I am very much passionate about programming. I won 5 national and state level(combined) programming competitions (counting only 1st rank/winner prices). Also, I secured the best IT studen Thêm

₹400 INR / giờ
(0 Đánh Giá)

9 freelancer đang chào giá trung bình ₹345/giờ cho công việc này


I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on client side, using c++ under windows envir Thêm

₹1000 INR / giờ
(105 Nhận xét)

I've been writing codes in JAVA for 4 years and I can get the task done. I'm very good with DS, algorithms and have no problem completing this code for you

₹261 INR / giờ
(29 Nhận xét)

Hi, I am PhD in sensor networks and have done lots of complex programming . I am confident of doing this in any language of your choice. Thanks for your patience kind regards

₹277 INR / giờ
(13 Nhận xét)

Run by IITians and based in Delhi, India, we cover complete horizon of Software development and Online solutions and services. We have been delivering with utmost efficiency at affordable pricing. Apps- Productivity: Thêm

₹277 INR / giờ
(0 Nhận xét)
₹222 INR / giờ
(0 Nhận xét)

Cygnus Softwares is an IT Global Consulting and Solutions Provider specifically implementing Mobile, Agile and BI technologies. We have a global presence and getting ready for CMMi Level 3 certification. Our Management Thêm

₹166 INR / giờ
(0 Nhận xét)

ISTQB certified software tester - foundation level (Gasq Board). Also have experience in software testing of 2+ years.

₹222 INR / giờ
(0 Nhận xét)

I noticed your advertisement for the position and think I would make an excellent candidate for it. If you are looking for a Developer who will go the extra mile to get things done, then I am your man. There is nothi Thêm

₹277 INR / giờ
(0 Nhận xét)