Create a program in Raptor that will calculate the cost of a

Create a program in Raptor that will calculate the cost of a cable bill. Here is a breakdown of costs:

Processing Fee: $5

Basic Cable: $35

Premium Channels: $20 for each package

Your program needs to use a class to calculate the cost for the user. The user will provide to the class the number of premium cable channels they want to view. The program needs to print out to the user their total cost per month.

Use the following test data for your program:

Number of channels: 4
Monthly Bill: $120.00

Number of channels: 2
Monthly Bill: $80.00

The following rubric will be used to determine your grade:

Solution

CalCableBill.java

import java.util.Scanner;

public class CalCableBill {

   public static final int PROCESSING_FEE=5;
   public static final int BASIC_CABLE=35;
   public static final int PREMIUM_CHANNEL=20;
  
   public static void main(String[] args) {
       //Declaring variables
       int no_of_channels,monthly_bill;
      
       //Scanner class object is used to read the value entered by the user
   Scanner sc=new Scanner(System.in);
     
   //Getting the number of channels entered by the user
   System.out.print(\"Enter Number of channels :\");
   no_of_channels=sc.nextInt();
     
   //calculating the monthly Bill
   monthly_bill=BASIC_CABLE+PROCESSING_FEE+no_of_channels*PREMIUM_CHANNEL;
     
   //Displaying the monthly cable bill
   System.out.println(\"Monthly Bill :$\"+monthly_bill);

   }

}

_____________________________________

output:

Enter Number of channels :4
Monthly Bill :$120

_____________________________________

Output1:

Enter Number of channels :2
Monthly Bill :$80

_________________Thank You

Create a program in Raptor that will calculate the cost of a cable bill. Here is a breakdown of costs: Processing Fee: $5 Basic Cable: $35 Premium Channels: $20
Create a program in Raptor that will calculate the cost of a cable bill. Here is a breakdown of costs: Processing Fee: $5 Basic Cable: $35 Premium Channels: $20

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site