All Projects → aabarmin → epam-java-cources

aabarmin / epam-java-cources

Licence: other
Practice tasks for EPAM students of Java Core courses. Write code with pleasure!

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to epam-java-cources

gtd.vim
Getting things done with Vim
Stars: ✭ 42 (+110%)
Mutual labels:  tasks
fpplatform
FPPlatform is the fixed-price marketplace software that is capable to launch fiverr clones, microworkers, etc. Ideal for micro jobs, tasks, errands, etc
Stars: ✭ 28 (+40%)
Mutual labels:  tasks
WeekToDoWeb
WeekToDo is a free minimalist weekly planner app focused on privacy. Schedule your tasks and projects with to do lists and a calendar. Available for Windows, Mac, Linux or online.
Stars: ✭ 48 (+140%)
Mutual labels:  tasks
sp-build-tasks
👷 SharePoint front-end projects automation and tasks tool-belt
Stars: ✭ 15 (-25%)
Mutual labels:  tasks
To-Do
To-do is a web app that helps to organize your day-to-day activities. It lists all the activities that you need to be completed and allows you to mark them as complete or not. Tasks can also be dragged and dropped in any position. It's a minimalistic website built using JavaScript ES6, Webpack, and CSS.
Stars: ✭ 14 (-30%)
Mutual labels:  tasks
boxofhope
Box Of Hope is a C++ event driven platform to protect you during the COVID-19 pandemic. BOH uses NFC and WiFi technology to ensure your mask usage is on point and employs sterilizing UV LEDs to clean your fabric mask.
Stars: ✭ 19 (-5%)
Mutual labels:  students
internships
🍕 Find tech related internships at startups across europe and start hustling.
Stars: ✭ 21 (+5%)
Mutual labels:  students
jobxx
Lightweight C++ task system
Stars: ✭ 76 (+280%)
Mutual labels:  tasks
introduction-to-computer-science
Microsoft TEALS Program - Introduction to Computer Science
Stars: ✭ 93 (+365%)
Mutual labels:  students
intern.plus
Upgrade your internship hunting experience.
Stars: ✭ 52 (+160%)
Mutual labels:  students
PowerShell
Mega collection of 250+ useful cross-platform PowerShell scripts.
Stars: ✭ 274 (+1270%)
Mutual labels:  tasks
SIES-Library
A simple catalog app for SIESGST Library using Google Books API
Stars: ✭ 34 (+70%)
Mutual labels:  students
Summer-Hacks
Make a cool summer-themed portfolio website.
Stars: ✭ 27 (+35%)
Mutual labels:  students
schsrch
Simple and intuitive CIE search engine
Stars: ✭ 35 (+75%)
Mutual labels:  students
pindery
An amazing party app.
Stars: ✭ 14 (-30%)
Mutual labels:  students
moodle-downloader
A 4.9 stars rated chrome extension for batch downloading Moodle resources 💾
Stars: ✭ 68 (+240%)
Mutual labels:  students
Notre-Dame-v3
The 3rd generation of ÉTSMobile, the main gateway between the École de technologie supérieure and its students on mobile devices
Stars: ✭ 13 (-35%)
Mutual labels:  students
HostelUtilityApp
An App to maintain hostel facility and establish a connection between the warden, dean and student
Stars: ✭ 21 (+5%)
Mutual labels:  students
davx5-ose
DAVx⁵ is an open-source CalDAV/CardDAV suite and sync app for Android. You can also access your online files (WebDAV) with it.
Stars: ✭ 160 (+700%)
Mutual labels:  tasks
MyApp
随便写的各种,点链接可以进入我的知乎
Stars: ✭ 51 (+155%)
Mutual labels:  students

Tasks for Java Core course attendee

Table of Contents

How to use this repository

It's recommended creating a fork of this repository to work on tasks independently. In this case you'll have your own copy of the repository and all your implementations will stay in your own repository. Of course, this approach has both benefits and drawbacks:

  • Benefit - nobody sees your code except yourself.
  • Drawback - nobody sees your code except yourself.

How to make a fork of this repository

To create a fork of this repository press a Fork button on the top right of this page. GitHub will ask you about the location of a newly created repository and next you'll be able to clone the repository to your local machine:

$ git clone https://github.com/your-account-name/epam-java-cources

As a result, you'll have a folder called epam-java-courses locally.

How to get updates of a remote repository

When the fork is created it'll not receive updates automatically, it's necessary making some manual configuration for your local repository - you need to add a new remote to your local repository. To do it, execute the following command:

$ git remote add -t master epam http://github.com/aabarmin/epam-java-cources/

This command will associate your local repository with one additional remote repository - mine repository. In means that you can send and receive updates from both remote locations - from mine and from your.

The following command will show what remotes are associated with your local repository:

$ git remote show

epam
origin

origin is a default name for your remote (https://github.com/your-account-name/epam-java-cources), the epam remote is an association with my remote repository (https://github.com/aabarmin/epam-java-cources).

The next step is to create a branch that will get updates from my repository. The following command will create such kind of branch:

$ git checkout -b epam_master --track epam/master

This command will create a new branch called epam_master that receives updates from my repository. You can see the list of all your branches by executing the following command:

$ git branch -a

epam_master
master

When you would like to get updates, you need to pull updates from my repository:

$ git checkout epam_master
$ git pull

And next merge my changes to your master branch:

$ git checkout master
$ git pull
$ git merge epam_master

As a result, your master branch will receive updates and new tasks if they're present.

Don't forget to update your remote master:

$ git push origin master

What is the task

Any task in this repository consists of three parts:

  1. Description.
  2. An interface for the implementation.
  3. Tests for the task.

The first part, the description is in JavaDoc of the interface, but anyway it's important to mention it here. The second part is the interface that declares a contract between a task and the solution. All the interfaces are in the src/main/java folder and look like this:

/**
 * Calculator.
 * <p>
 *     Implementing ordinary calculator which checks input data.
 * </p>
 */
public interface Task001 {
    /**
     * Execute addition operation.
     *
     * @param firstNumber string value of first number
     * @param secondNumber string value of second number
     * @return result of addition operation
     * @throws IllegalArgumentException if input parameters are not set
     * @throws NumberFormatException if can't convert input values to numbers
     */
    double addition(String firstNumber, String secondNumber);
}

The most important part of the task is a collection of tests that checks your implementation. Tests are stored in the src/test/java folder and has a name like the task name plus Test like Task001Test.

Tests are ordinary JUnit tests:

public class Task001Test {
    public static final double DELTA = 0.0000001;

    private Task001 instance;

    @Before
    public void setUp() throws Exception {
        instance = TestHelper.getInstance(getClass());
    }

    @Test(expected = IllegalArgumentException.class)
    public void additionNullBothArguments() throws Exception {
        instance.addition(null, null);
    }
}

How to solve a task

First of all, it's better working on the separate task in its own branch. To create a separate branch, execute the following command:

$ git checkout master
$ git checkout -b <task-number>

In order to solve the task, it's necessary writing an implementation class that is in the same package as the interface and has a name with Impl at the end. This implementation should implement the interface of the task.

public class Task001Impl implements Task001 {
  @Override
  double addition(String firstNumber, String secondNumber) {
    // TODO, your implementation goes here
  }
}

When all the tests are passed, don't forget to create a commit and push your changes to the remote repository:

$ git commit
$ git push --set-upstream <remote_name> <task-number>

The last one step is to go to the GitHub page of your repository and create a merge request from your task branch to the master branch of your repository. It'll allow you to send your code for review to your colleagues or friends on the one hand and on the other hand you'll be able to take one more look into your code later. When the code is completed, you'll merge the task branch to the master branch.

Updates from your remote master branch can be received using the following command:

$ git checkout master
$ git pull

Git looks quite complicated, but the following resources will help you be familiar with it shortly:

How to check all the tasks at once

Of course, you can run tests from your favorite IDE but it's also possible checking all of them at once using Gradle and the following command:

$ ./gradlew test

Cross topic projects

This repository also has two tasks for the large cross topic projects. These projects are described on separate pages:

Contribution

If you see you can make this repository better - don't hesitate to contribute. Any kind of contributions are desired:

  • Bug reports
  • Bug fixes
  • New tasks
  • New tests

How to raise a bug report

If you see an error, don't hesitate to raise a bug report just by clicking direct New issue link or using the Issues link on the top of the page and next by clicking the New issue button on the top right.

Your contribution is very appreciated.

How to add a new task or test

In order to add a new task or test you need to create a fork of this repository using How to use this repository guide and create a branch from the epam_master branch.

$ git checkout epam_master
$ git pull
$ git checkout -b <new-task-branch>

When the branch is created, write your code in the branch and then commit and push:

$ git commit
$ git push origin --set-upstream <new-task-branch>

And the last one step is to create a pull request into the master branch of my repository.

How to check tasks automatically

Jenkins in Docker

There is an automated way to check all the tasks at once and build a meaningful report - run a series of Jenkins jobs and get a CSV file.

To run a Jenkins instance, it's recommended using a Docker container, a special Docker image with all the necessary scripts a prepared in the /src/main/docker/jenkins/Dockerfile. To start a Jenkins instance execute the following command:

$ cd ./src/main/docker/jenkins
$ docker-compose up -d

As a result, a docker stack with one single instance will be started and Jenkins will be available using the following URL: http://localhost:8080.

Configuring Jenkins

It's recommended installing the following plugins:

  • AdoptOpenJDK installer
  • Config File Provider Plugin

Jenkins jobs

The next step is to create two following jobs:

Jobs name Job pipeline file
BUILD_REPORT /src/main/jenkins/BUILD_REPORT/Jenkinsfile
BUILD_SINGLE /src/main/jenkins/BUILD_SINGLE/Jenkinsfile

Jobs configuration files

Jenkins jobs require a configuration file called STUDENT_REPOS. This file should be created using the Config File Provider plugin. The file should contain a list of Git repos to clone and then build.

Jenkins tools

It's necessary having a tool of type JDK with name JDK_11. I've used AdoptOpenJDK plugin to install the necessary JDK version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].