Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Step 1: Get data from user Prompt the user for the following information Plan Type: C/c for Commercial, R/r for Residential, S/s for Student Talk

image text in transcribed

image text in transcribed

Step 1: Get data from user Prompt the user for the following information Plan Type: C/c for Commercial, R/r for Residential, S/s for Student Talk Minutes: Whole number only 2 pts Step 2: Validate Data Validate data and display an appropriate and descriptive error message. If any invalid data exists, do not display invoice Examples of invalid data Note: This list is not exhaustive Negative number for number of talk minutes. Any letter other than: C/c, R/r, or S/s for plan type 5 pts Step 3: Calculate based upon plan type Use the table above to calculate the price for each line item ts Step 4: Display Invoice Use the format above to display the invoice 5 pts Step 5: Expected ruby expression 3pts 1. Do not hard code 10080, use the following constants and calculate the maximum number of minutes per week. a. MINS PER HOUR= 60 b. HOURS PER_DAY 24 C. DAYS PER WEEK 7 2. Determining Plan Type Spts Usecase. statement or if statements. Make sure to handle both upper and lower case values For example: playType "c case planType a. b. when "e", "C" end 3. Use 'if statements where needed Step 1: Get data from user Prompt the user for the following information Plan Type: C/c for Commercial, R/r for Residential, S/s for Student Talk Minutes: Whole number only 2 pts Step 2: Validate Data Validate data and display an appropriate and descriptive error message. If any invalid data exists, do not display invoice Examples of invalid data Note: This list is not exhaustive Negative number for number of talk minutes. Any letter other than: C/c, R/r, or S/s for plan type 5 pts Step 3: Calculate based upon plan type Use the table above to calculate the price for each line item ts Step 4: Display Invoice Use the format above to display the invoice 5 pts Step 5: Expected ruby expression 3pts 1. Do not hard code 10080, use the following constants and calculate the maximum number of minutes per week. a. MINS PER HOUR= 60 b. HOURS PER_DAY 24 C. DAYS PER WEEK 7 2. Determining Plan Type Spts Usecase. statement or if statements. Make sure to handle both upper and lower case values For example: playType "c case planType a. b. when "e", "C" end 3. Use 'if statements where needed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions