Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is Ruby Language problem Directions: Please complete the following assignment to signify your completion of Unit 5. All programming projects need to be completed

This is Ruby Language problem

Directions:

Please complete the following assignment to signify your completion of Unit 5. All programming projects need to be completed and submitted electronically, following the Electronic Submission Guidelines discussed in class.

Background:

The purpose of this assignment is to get practice working with loops and functions. Loops are very useful in programming and, often, programs use loops in situations where new programmers might not spot a loop. When working with loops, it is important that you make progress toward the goal of getting the loop to stop. Otherwise, your loops will run forever, which is a very common programming problem for new programmers. Functions are the backbone of Ruby programs. We need to get very comfortable with how to define and call functions. Functions are a problem-solving strategy. Functions break a large, complex problem into smaller, more manageable pieces.

Project 1: College Student Fees Create a Ruby program which calculates student fees for those attending College. IN ORDER TO RECEIVE FULL CREDIT, YOU MUST CREATE AND CALL FUNCTIONS WITH PARAMETERS TO SOLVE THIS PROBLEM. IN ADDITION IN ORDER TO RECEIVE FULL CREDIT, YOU MUST THROW AND CATCH EXCEPTIONS WHEN THE USER ENTERS INVALID DATA VALUES.

Summarized in the chart below is the cost calculations I want your program to perform.

COLLEGE STUDENT FEES (as of Fall, 2015)

Enrollment Fee

$ 46.00/ unit for California Residents $ 335.00/ unit for F1/Non-Residents

Student Services Fee (AS Sticker fee is Optional, saving $19.50) (ID Card fee is Optional, saving $13)

$ 48.50 Winter/Summer $ 51.50 Fall/Spring

Parking Decal (Optional)

$ 45.00 Winter/Summer $ 85.00 Fall/Spring

A number of different program dialogues describe the program I am looking for.

College Fee Calculator Enter number of units enrolled: 18 Is this Fall[0], Winter[1], Spring[2] or Summer[3] session: 0 Are you a state resident[0] or not[1]: 0 Want a parking decal? [y/n]: n Want an AS sticker? [y/n]: n Want an ID card? [y/n]: n For Fall semester, your total fees are $ 847.00

College Fee Calculator Enter number of units enrolled: 6 Is this Fall[0], Winter[1], Spring[2] or Summer[3] session: 1 Are you a state resident[0] or not[1]: 1 Want a parking decal? [y/n]: y Want an AS sticker? [y/n]: y Want an ID card? [y/n]: y For Winter semester, your total fees are $ 2103.50

College Fee Calculator Enter number of units enrolled: 18 Is this Fall[0], Winter[1], Spring[2] or Summer[3] session: 2 Are you a state resident[0] or not[1]: 1 Want a parking decal? [y/n]: y Want an AS sticker? [y/n]: y Want an ID card? [y/n]: y For Spring semester, your total fees are $ 6166.50

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago