Threesuns

Email the Instructor

Contact

All Semesters

Semesters

All Courses

Courses

2018Fall

08.21.17 - 12.17.17

Introduction to Computer Programming

CSYS1203

Tuesday Thursday
02:00 PM - 03:20 PM

BankAccount in Ruby

Lab07

Objective: To translate a pseudocode into programming code

pastdue

Submit Your Solution

Lab07

Request a Copy of your Solution

Lab07

Requirements

A readable ruby program is produced5 pts
Program runs without errors or warnings5 pts
Program conforms to logic as indicated in the pseudocode40 pts
Total50 pts

Instructions

Attached to this assignment you'll find three files, planet_weight.txt and planet_weight.rb. the txt file is the pseudocode that was used to write the rb file which is written in the Ruby programming language. Study the pseudocode and the ruby code side by side and make notes of how the following things are done in Ruby:

  • modules are written, values are passed and returned, how they're called
  • control structures are written, if statements, do/while and while statements
  • input and output is performed, how are literal and variable strings displayed, how to get numbers from the user

With those elements of the Ruby language in mind, translate the attached bankaccount pseudocode for managing the balance of a bank account into a working Ruby program.

You can test your Ruby code in a modern web browser by going to repl.it or by installing Ruby on your computer.

Extras