Skip to content

EPAM-External-Trainee/Task_01

Repository files navigation

.NET Summer 2020 (external)

Task01. Declaring_and_calling_methods

Task 1

  • Develop a type that implements the Euclid algorithm for calculating the GCD of two integers (http://en.wikipedia.org/wiki/Euclidean_algorithm).
  • Add additional functionality to the developed type in the form of overloaded methods for calculating GCD for three, four, or five integers.
  • Add to the developed type a method that implements the Stein algorithm (binary Euclid algorithm) for calculating the GCD of two integers (http://en.wikipedia.org/wiki/Binary_GCD_algorithm). The method must accept an out parameter containing the value of the time spent for performing calculations.
  • Change the method that implements the Euclid algorithm for calculating the GCD of two parameters, adding similar functionality.
  • Add a method that prepares data for building a histogram that compares the time of finding a solution for each of the methods.
  • Create unit tests to test the developed methods.
  • All code should be annotated (autocommentary).
  • The project must be hosted in the repository.

Task 2

  • Use OOP features: classes, inheritance, polymorphism, and encapsulation.
  • When encoding, the code design conventions (C# code convention) must be used.
  • Classes must be properly organized into libraries.
  • Classes must have ToString(), GetHashCode (), and Equals () methods.
  • Create a class that allows you to upload data from a text file into an array.
  • Create classes to work with shapes defined on the plane.
  • Shapes can be set by the size of their sides, or by the coordinates of their vertices.
  • Provide methods for calculating the area and perimeter of each shape.
  • Find all shapes equal to this one in the array.
  • Create unit tests to test the developed methods.
  • All code should be annotated (autocommentary).
  • The project must be hosted in the repository.