Skip to content

Instantly share code, notes, and snippets.

View MikhailMorozyk's full-sized avatar

MikhailMorozyk

View GitHub Profile
@MikhailMorozyk
MikhailMorozyk / Addit words
Created June 12, 2017 19:48
Homework 5 OOP
package ru.mail.exe.brother;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class AdditWords {
package ru.mail.exe.brother;
public class TooMuchStudentsExeption extends Exception {
public String showText() {
return ("You put more than 10 students!");
}
}
@MikhailMorozyk
MikhailMorozyk / Class Exception
Created June 5, 2017 19:49
Group of students
package ru.mail.exe.brother;
public class TooMuchStudentsException extends Exception {
public String showText() {
return ("You put more than 10 students!");
}
}
package ru.mail.exe.brother;
public class MainTriangle {
public static void main(String[] args) {
Triangle triangleOne = new Triangle();
triangleOne.setA(4.3);
triangleOne.setB(3.2);
triangleOne.setC(5.1);
package ru.mail.exe.brother;
import java.util.Scanner;
public class TaskThree {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int binaryNumber = 0;
package ru.mail.exe.brother;
public class TaskThree {
public static void main(String[] args) {
int a = 7;
int b = 9;
String rectangle = drawRectangle(a, b);
}
package ru.mail.exe.brother;
import java.util.Scanner;
public class TaskTwo {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Input lenght:");
int s = sc.nextInt();
@MikhailMorozyk
MikhailMorozyk / Factorial
Created May 10, 2017 18:45
Create wallpapers with different types of "lines",Make a program to find a factorial of integer,Print multiplication sign for number 5,Show rectangle with lenght and width printed from keyboard
package ru.mail.exe.brother;
import java.util.Scanner;
public class Second {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n;
package ru.mail.exe.brother;
public class Geron1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int a=5;
int b=6;
int c=7;