Skip to content

Latest commit

 

History

History
128 lines (84 loc) · 4.29 KB

README.md

File metadata and controls

128 lines (84 loc) · 4.29 KB

Treina Dev

Here I'll keep my exercises for TreinaDev, an online course about web development in Ruby.

First, I'll keep here the exercises I had to do for the selective process that I'm current enrolled.

Next, I pretend to keep my projects for the course.

The aim of this course is to prepare the student for the job market.

Selective Process

Using Git:

  • Configure and learn how to use git and commit an example file.

Ruby Fundamentals

  • Create an simple calculator that sums, subtracts, multiply and divides two numbers.

  • Return a data of an specific data type

  • Count how many vowels and consonants there are in a phrase.

  • Transform a phrase, turning each even character into downcase and each odd character into upcase.

  • Sum numbers in a string

  • Verify if every digit in [1, 2, 3, 4, 5, 6, 7, 8, 9] appears in an array one and only one time.

  • Find the '?' in a first degree equation

  • Multiply each item in an array for its index

  • Multiply odd or even numbers by a variable

  • Calc the multiplication table for a number n

  • Replace each item in an array by its antecessor and its successor.

  • Verify if there is a string that is equal of its reverse for each string in an array and if it is true, remove it.

  • Create multiple functions to manipulate arrays

  • Print the sum of the numbers of unique chars of each string in an array.

First Steps with OOP

  • Create a class with determinate atributtes.

  • Create a class Product with values name, category, price and stock and with methods to add or remove items from the stock. Create another class Payment with values quantity, product, price and value and with methods calculate the value and apply the discount.

  • Apply good practices for OOP, connecting the classes.

  • Read a file and then convert binary numbers to decimal.

  • Read a string and then convert each decimal number to a binary number and write it in a file.

  • Use inheritance to create the classes PaymentCredit, ProductBooks, etc.

  • Read a JSON file with one object

  • Write an object in a file JSON

  • Read multiples objects from a JSON file

  • Customize the to_json method

Treina Dev 6