Skip to main content

I program stuff, I hope fix yours. Hi, mi name is Luis Eduardo Vargas Victoria, I study Bachelor of Science in Computer Engeneering in Tecnologico de Monterrey Campus Guadalajara, I studied app developing for IOS, I love videogames I'm working on an idea, I love movies, series, books, hang out with friends and code. I make videos on youtube, I'm starting actually I had almost 2000 views and 60 subscribers, I have another channel where I have almost 20,000 views and almost 300 subscribers, I love all the stuff above and in this class I would like to learn so that way continue with my ideas in app development.

twitter.com/VenkonProgram

github.com/VenkonProgram

 

#TC201 #Topic15 What is the metaobject protocol?

1 min read

metaobject protocol (MOP) provides the vocabulary to access and manipulate the structure and behavior of objects. Typical functions of a metaobject protocol include:

  • Creating and deleting new classes
  • Creating new methods and properties
  • Changing the class structure so that classes inherit from different classes
  • Generating or modifying the code that defines the methods for the class

Source: Wikipedia.

 
 

#WSQ11 #Java #TC201 Library Assignment Programming Fun

1 min read

The libraries of SmallTownX need a new electronic rental system, and it is up to you to build it. SmallTownX has two libraries. Each library offers many books to rent. Customers can print the list of available books, borrow, and return books.

Problem

 

We provide two classes, Book and Library, that provide the functionality for the book database. You must implement the missing methods to make these classes work. 

The first part of the problem that is the implementation of Book was easy, we only put what they asked us to put, filling the methods is easy if you already have the other WSQ, the hard part is when is the turn of the Library at first we have to make the address of the library, that's simple, then we have to make an ArrayList where all the books will be, that's the hard part, then we have to check the hours the both libraries are available, that's very simple, then borrow and return books that's the hard part but when you get it is simple.

I won't post pictures because I'm lazy but here's the code 

Book

Library

 

#WSQ10 #Java #TC201 - College Advice

2 min read

I like this from Joel Sposky, "If you enjoy programming computers, count your blessings: you are in a very fortunate minority of people who can make a great living doing work they enjoy. Most people aren't so lucky. The very idea that you can "love your job" is a modern concept. Work is supposed to be something unpleasant you do to get money to do the things you actually like doing".

Advices

  • Learn how to write before graduating

This is a great advice because to express your ideas you need the abilities to transmit them, and writting and SPEAKING, he miss that, are a very usefull.

  • Learn C before graduating.

I asked many programmers what I must learn before I graduate and actually all of them answer me the same, learn C, is the base for all, so I'll take this advice. 

  • Learn microeconomics before graduating.

My dad had always said to me that the difference between a common CS engineer and me can be the way I present myself and the business stuff I know, so actually this advice is already done 

  • Don't blow off non-CS classes just because they're boring.

I'm trying myself so hard to keep at least a 3.0 in my GPA, but I have to admit that is hard but I'll do my best.

  • Take programming-intensive courses.

I already take intensive programming courses, they are awesome, but the things that I have learnt I kind of forgot them because the practice makes the master, so actually the adivce is keep programming so you can be awesome at what you do

  • Stop worrying about all the jobs going to India.

I heard about India and how cool they are at my area but the thing is that if you can develop a great idea that no one have, that's the key of success, be good at something and create awesome things that help humanity

  • No matter what you do, get a good summer internship.

I'll take this advice unless I develop an idea that changes the world

 

 

#TC201 #Topic14 What are overloading and overwriting? How do we implement those in Java?

2 min read

Method overloading in Java occurs when two or more methods in the same class have the exact same name but different parameters, is a feature that allows a class to have two or more methods having same name, if their argument lists are different.

Declaring a method in subclass which is already present in parent class is known as method overriding. The main advantage of method overriding is that the class can give its own specific implementation to a inherited method without even modifying the parent class. The benefit of overriding is: ability to define a behaviour that's specific to the subclass type which means a subclass can implement a parent class method based on its requirement.

Let's summarize the differences between overloading and overriding. When overloading, one must change either the type or the number of parameters for a method that belongs to the same class. Overriding means that a method inherited from a parent class will be changed. But, when overriding a method everything remains exactly the same except the method definition basically what the method does is changed slightly to fit in with the needs of the child class. But, the method name, the number and types of parameters, and the return type will all remain the same.

Difference

Overloading

Override

 

 

#TC201 #Topic5 What are CRC cards and how do we use them?

1 min read

Object-Oriented Design: CRC Cards has three sections, the first C is the name of the class at the top, usually underlined, the R is the responsibilities of the class, the things that needs to takecae of, and C is the collaborators, the other classes it interacts with.

CRC Cards

 

#TC201 #Topic4 What is delegation?

1 min read

Delegation is a technique where an object expresses certain behavior to the outside but in reality delegates responsibility for implementing that behaviour toan associated object. This sounds at first very similar to the proxy pattern, but it serves a much different purpose. Delegation is an abstraction mechanism which centralizes object behaviour.

The delegation design pattern allows an object to delegate one or more tasks to a helper object. Two classes are used to achieve this: the delegate and delegator, both which realise a common interface. A method (or methods) on the interface represent the functionality to be delegated. A call to the delagtor calls the matching function on the delegate.

 

#WSQ08 #Java #TC201 - YoSoy196

1 min read

Well, this was hard, because I tried to translate my python code to Java and it is really hard so I use the help from my classmate Gilberto Rogel and he help me, here is the python and the Java Code:

Code: YoSoy196

 

#TC201 #Topic12 What is polymorphism?

1 min read

Polymorphism in a cientific way is when we use inhertiance to create new classes, each new class inherits both the data members and the methods of the superclass. But simethimes the methods need to behave differently depending on the new class deinition. In the case where the subclasses may need to behave differently, they still contain the same method name but they have a different implementation.

Well, in few words and well explained is when a subclass inherit a method from the superclass and another subclass inherits the same method and both of them do something related to the method but not the same thing each of them override the generic method that the superclass inherits to do what they need to do.

Source: Polymorphism

 

#TC201 #Topic10 What are visibility modifiers, their purpose and use in practice?

3 min read

Let's start with this chart: 

            | Class | Package | Subclass | World
————————————+———————+—————————+——————————+———————
public      |  y    |    y    |    y     |   y
————————————+———————+—————————+——————————+———————
protected   |  y    |    y    |    y     |   n
————————————+———————+—————————+——————————+———————
no modifier |  y    |    y    |    n     |   n
————————————+———————+—————————+——————————+———————
private     |  y    |    n    |    n     |   n

y: accessible
n: not accessible
  • private member is only accessible within the same class as it is declared.

  • A member with no access modifier is only accessible within classes in the same package.

  • protected member is accessible within all classes in the same package and within subclasses in other packages.

  • public member is accessible to all classes (unless it resides in a module that does not export the package it is declared in).

 

 

Which modifier to choose?

Access modifiers is a tool to help you to prevent accidentally breaking encapsulation(*). Ask yourself if you intend the member to be something that's internal to the class, package, class hierarchy or not internal at all, and choose access level accordingly.

Access Control and Inheritance:

The following rules for inherited methods are enforced:

  • Methods declared public in a superclass also must be public in all subclasses.

  • Methods declared protected in a superclass must either be protected or public in subclasses; they cannot be private.

  • Methods declared private are not inherited at all, so there is no rule for them.

 

Sources:

Modifiers

Access modifiers