Computer Science, asked by LavenderBlurr, 6 hours ago

A mobile phone service provider uses a program that computes the monthly bill of
customers as follows:
Minimum Rs 300 for up to 120 calls Plus Re 1 per call
for the next 70 calls Plus Rs 0.80 per call
for the next 50 calls Plus Rs 0.40 per call for any call beyond 220 calls.
Design test cases for this program using equivalence class testing technique

Answers

Answered by devindersaroha43
0

Answer:

Explanation:

import java.util.*;

class Telephonebill

{

public static void main()

{

Scanner Sc=new Scanner(System.in); System.out.println(“Enter no of calls made ”);

double c=Sc.nextDouble();double a=0;

if(c>=80)

{

a=2.50*c;

} else if(c>=80&&c<=160)

{

a=(80*2.50)+((c-180*0.60);

}

else if(c>=160&&c<=280)

{

a=(80*2.50)+(80*0.60)+(( c-160)*0.50);

}

else if(a>=280)

{

a=(80*2.50)+(80*0.60)+(120*0.50)+((c-280)*0.40;

}

{

System.out.println(“Total number of calls made is “+c);

}

{

System.out.println(“Bill amount is “+a);

} } }

Output: Enter the no. of calls made 200

Total number of calls made is 200

Bill amount is 264

Similar questions