Can I become a software developer?

Why software development?
Before starting to teach a person programming, we’d better find out, what it gives him or her.1 Simple and interesting job.
Software engineer is a simple and interesting job. It has great room for creativity. I love it. At first I went crazy at the thought I do what I like and get paid for it. But then I got used to it eventually.2 It’s well paid.
I simply enjoy watching my friends buying themselves cars and houses in 5 years’ work.3 Flexible hours.
A strict work schedule is a nasty thing. Any person who had ever been in a traffic jam during rush hour or got fined for being 5 minutes late can confirm that. And what about being able to arrive at work at 11 am and leave at 5 pm? For most programmers it is a usual schedule. Just do your work and no one will say a cross word. You may even work home in most of the companies. You can always come to a reasonable agreement with your employer.4 Professional growth.
In most companies you need to climb the career ladder in order to get good payment. A software developer only has to be a software developer. You won’t have to re-qualify from a developer to manager or try to take a leading position. All you need to do is grow professionally. Developers who have 5 to 10 years of experience get paid royally.5 High international mobility.
There are three most highly paid professions in the world: a lawyer, a doctor and a software developer. It is a real challenge for lawyers working abroad: different laws, case-law etc. A doctor has to learn the language, other medical standards and pass exams. A developer won’t have to learn anything additional. Same language. Same standards. For most times even clients are the same.Why Java?
The total of three following factors made me retrain people for Java developers.1. Java — is one of the easiest language for learning.
A person who‘ve just finished school is able to learn it in 3 to 6 month, depending on the base knowledge and quantity of hours put into study.2. High demand on labor market.
You can get a job without prior experience. Companies employ interns eagerly and keep educating them.3. Highest salaries in the field.
One of the highest. This is especially important for junior developers.Programming is a skill

New innovational teaching method
CodeGym education is made in a different way than college education. You’ll notice it quite soon. It’s much more effective. Your studies in college were probably like this: long lectures and practice to nail down what you’ve learned. Following this approach you improve your knowledge, not skills. To be honest, you skills acquired this way are practically worth nothing. I have another approach. I believe a person should ask questions first, and only then get answers on them. An answer before a question has no value. My lectures are answers on your questions. So first I give you practical tasks that are hard to solve with your current knowledge. These tasks raise questions and then you receive my answers that are knowledge and lectures. I present new knowledge to you in three stages:Introduction (Minimum theory and a few practical tasks)
Principal block knowledge (You should understand the topic fully)
Details and nuances (I fill gaps here)
Level 5

1 Elly talks about classes
- Hey, Amigo! - Hi, Elly! - Today I want to explain you what the classes are. - Explanation # 1. I’ll start with an analogy. All things in our universe are made of atoms. They can be of different types: hydrogen, oxygen, iron, uranium, ... Combining atoms enables creating various things or objects. - The same is true to the universe of Java. Here programs consist of objects of different types (where class is a type): Integer, String, File, Object, … Combining objects enables creating various web-services or programs. - Different atoms have different internal structure. They contain a number of electrons, protons and neutrons. - Different classes (object types in Java) have different internal structure too. They contain various variables and methods. - Yes, I have a general idea of the atom structure. I’m a robot, aren’t I? - Let’s look at the program as a whole: the objects are like building blocks that make up the program. Classes are types of those blocks. Blocks of different types are objects of different classes. - I kind of got it. - Explanation # 2. We create a new class when we need a new type of object. Within this class we describe the desired behavior of objects. - Well, I’ve understand something, but I’m not sure of this. - Considering internal structure, the class consists of class methods that do something and of class variables where methods store shared data. - Simply said, the class is a set of methods? - Pretty much, more specifically, the class is a group of methods that work together and variables in which methods store different values to share. - Yeah. To create a new class, we need to write these methods … - Yep. We also need to decide which variables are shared by different methods, and then take out variables from a method to the class: turn method variables into class variables. - Classes are created on the following pattern: 1 The programmer decides what other objects he needs. 2 The programmer divides these objects into different types depending on what they do. 3 The programmer writes a separate class for each type. 4 In the class, he declares the necessary methods and variables. 5 Commands have to be written in each method in order the method does what the programmer wants it to do. 6 The class is ready, now you can create its objects. - Awesome! It’s an interesting scheme. I’ll remember it. - You have to memorize it, it will be of use. Programming approach, in which the program is divided into objects, is called object-oriented programming (OOP). - Java is a classic example of OOP approach, because in Java everything is objects. - Learning Java consists of two major tasks: learning to write your own classes and learning to use other people’s classes. Today we start with the easiest things. You’ll learn to write simple classes and, of course, create their objects. Objects are often called instances of the classes. These are synonyms, either way is correct. - Got it. - To sum up I can say that the class is a miniprogram: a set of data and functions that do something with this data. An important feature of classes is the ability to create instances of these classes (objects). - To create a class object, you need to write in the code «new class_name()».

2 Risha talks about packages
- Hey, Amigo! Now I tell you about the packages. - Files in the computer are grouped into folders. Classes in Java (each class is in a separate file) are grouped by packages that are folders on a disc. This is nothing new. But there are two remarks. - First, «a unique full class name» is the «package name» + «class name». Examples:

3 Kim show video tutorials
- Hey, Amigo! Here are a couple of video tutorials, how to create classes and packages:4 Elly, objects creation, object references
- So, we’ve learned the classes last time. Today I’d like to tell you how to create objects. It’s very simple: write the keyword new and the class name for the object we want to create:


5 Diego, Tasks for creation of own classes and objects
- Hey, Amigo! Here are some tasks to create classes and objects:Tasks | |
---|---|
1 | Create a class Cat Create a class Cat. A cat must have its name (name, String), age (age, int), weight (weight, int), and strength (strength, int). |
2 | Implement method fight Implement method boolean fight(Cat anotherCat): implement a fight mechanism depending on cats’ weight, age and strength. Make up a dependency by yourself. The method should determine, whether current cat (the object whose fight method was called) or anotherCat won fight, i.e. return true if current cat won and false, if it didn’t win. The following condition must be met:
|
3 | Getters and setters for the class Dog< Create a class Dog. A dog must have a name - String name and age - int age. Create getters and setters for all the variables of the Dog class. |
4 | Create three objects of Cat type Create three objects of type Cat in the method main and fill them with data. Use the class Cat of the first task. Do not create the class Cat. |
5 | Hold three twosome fights between cats Create three cats using the class Cat. Hold three pairwise fights between cats. Do not create the class Cat. For the fight, use the method boolean fight(Cat anotherCat). Display the result of each fight. |
6 Risha talks about a object initialization
- I want to tell you about the object initialization. When an object is created, it’s necessary to assign startup data to its variables, in order to avoid a situation when you try access an object, and it has no data required to work properly. - Let’s consider an object of the type File. The minimum necessary information for the file is its name. A file without a name is a nonsense. - Suppose you are writing your own version of File class (MyFileClass for example) to work with files. What information is needed for each object of this class? - The name of the file which this object will work with? - That’s right. That’s why we add the method initialize() to our class. It’ll look like this:



7 Diego, Object initialization tasks
- Hey, Amigo! I’m bored without our lessons. Here are some object initialization tasks:Tasks | |
---|---|
1 | Create a class Friend Create a class Friend with three initializers (three methods initialize): - Name - Name, age - Name, age, sex |
2 | Create a class Cat Create a class Cat with five initializers: - Name - Name, weight, age - Name, age (standard weight) - Weight, color, (name, address and age are unknown, it’s an alley cat) - Weight, color, address (it’s someone else’s house cat) Initializer’s task is to make an object valid. For example, if the weight is unknown, you need to specify some average weight. A cat can’t have any weight at all, likewise age. But it can have no name (null). The same applies to the address - can be null. |
3 | Create a class Dog Create a class Dog with three initializers: - Name - Name, height - Name, height, color |
4 | Create a class Circle Create a class Circle with three initializers: - centerX, centerY, radius - centerX, centerY, radius, width - centerX, centerY, radius, width, color |
5 | Create a class Rectangle Create a class Rectangle. Its data will be top, left, width, and height. Write for it as much initialize (...) methods as possible Examples: - 4 parameters should be set: left, top, width, height - width/height are not set (both equal 0) - height are not set (equal to width), create a square - create a copy of another rectangle (it’s passed in the parameters) |
8 Elly talks about constructors
- It’s time to tell you about constructors. It’s very simple: programmers invented a shorthand notation for object creation and initialization:

- The name of the constructor method is the same as the class name (instead of initialize).
- The constructor method has no return type (no type is specified at all).
9 Diego, Constructor tasks
- You’ve had some rest, I guess. Fine. Here are some constructor creation tasks:Tasks | |
---|---|
1 | Create a class Friend Create a class Friend with three constructors: - Name - Name, age - Name, age, sex |
2 | Create a class Cat Create a class Cat with five constructors: - Name, - Name, weight, age - Name, age (standard weight) - Weight, color, (name, address and age unknown. It’s an alley cat) - Weight, color, address (it’s someone else’s house cat) Initializer’s task is to make an object valid. For example, if the weight is unknown, you need to specify some average weight. A cat can’t have any weight at all, likewise age. But it can have no name (null). The same applies to the address - can be null. |
3 | Create a class Dog Create a class Dog with three constructors: - Name - Name, height - Name, height, color |
4 | Create a class Circle Create a class Circle with three constructors: - centerX, centerY, radius - centerX, centerY, radius, width - centerX, centerY, radius, width, color |
5 | Create a class Rectangle Create a class Rectangle. Its data will be top, left, width and height. Create for it as much constructors as possible: Examples: - 4 parameters are set: left, top, width, height - width/height are not set (both equal 0) - height are not set (equal to width), create a square - create a copy of another rectangle (it’s passed in the parameters) |
10 Professor, Classes and constructors
- It’s me again. Our lectures are simply great. I won’t give you links to boring lectures. Here’s a link to excellent stuff! - Are you still here? Go quickly, read, and I must go to the lab. CodeGym Lecture 5 Discussion11 Julio
- Hey, Amigo! I’m a little tired. Let’s rest a bit, and then start the lesson. I’ve found a new episode:12 John Squirrels
- Hello, soldier! - Good morning, sir! - I have some awesome news for you. Here are tasks to reinforce your skills. Do it every day, and you’ll enhance your skills quick. Tasks are specially designed to do in Intellij IDEA.Additional tasks to do in Intellij Idea | |
---|---|
1 | 1. Three classes 1. Create class Cat and Dog by analogy with the class Duck. 2. Think of what the toString method should return in the classes Cat and Dog. 3. In the method main create two objects in each class and display them. 4. The Duck class objects are created and displaying. |
2 | Man and Woman 1. Create public static classes Man and Woman within the class Solution. 2. Classes must have fields: name(String), age(int), address(String). 3. Create constructors to pass all the possible parameters to. 4. Use the constructor to create two objects of each class with all the data. 5. Display the objects in format [name + " " + age + " " + address]. |
3 | 3. Create public static classes Dog and Cat. Add three fields to each class at your option. Create objects for the Tom and Jerry cartoon characters, as much as you remember. Example: Mouse jerryMouse = new Mouse(“Jerry”, 12 (height, cm), 5 (tail length, cm)) |
4 | 4. Display the current date Display to the screen the current date in a form similar to «21 02 2014». |
5 | 5. Read numbers from keyboard and calculate their total Read numbers from keyboard and calculate their total until the user enters the word «total». Display to the screen the total. |
Bonus tasks | |
---|---|
1 | 1. Program doesn’t compile and run. Fix it. Task: The program should read from keyboard two numbers and display their total. |
2 | 2. Add new functionality to the program. Old Task: add a new function that reads from keyboard two numbers and displays their minimum. New task: add a new function that reads from keyboard five numbers and displays their minimum. |
3 | 3. Learning and practicing algorithm. Task: Write a program that 1. reads from the console number N that is greater than zero 2. then reads N numbers from the console 3. displays the maximum of entered N numbers. |