-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.rb
55 lines (40 loc) · 1.22 KB
/
main.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# =================================== #
# Student Management System #
# Author: Jason D. F. D'Oyley #
# Start Date: Mon, Dec 17, 2018 #
# Email: [email protected] #
# Version: 0.1 #
# =================================== #
# Variable Syntax Key
# ===========================
# std - short for student
# Capture Student Information
# ===========================
# Student identification number
# First and last name to create full name
# Student email address
print "Student ID#: "
std_id = gets.chomp.to_i
print "First Name: "
first_name = gets.chomp
print "Last Name: "
last_name = gets.chomp
std_fullname = first_name + " " + last_name
print "Student Email: "
std_email = gets.chomp
# Clear console screen
system("clear")
# Output inputs back to user
# ==========================
# Create an app logo at the top of the console
puts "\t\tStudent Management System (SMS)"
print "\t\t===============================\n\n\n"
# Display results
# ==========================
# Table Heading
puts "ID# \t\tStudent's Name \t\tEmail Address"
puts "--- \t\t-------------- \t\t-------------"
# Table Body
puts "#{std_id} \t#{std_fullname} \t\t#{std_email}"
# Table Footer
10.times { puts }