This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
import org.junit.Assert; | |
import org.junit.Test; | |
import static calculator.StringDoubleCalculating.getActionSymbol; | |
import static calculator.StringDoubleCalculating.precondition; | |
/** | |
* Created by Ky on 22.03.2016. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
import java.io.File; | |
import java.io.IOException; | |
public class FilePath { | |
public static void main(String[] args) { | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
public class StringDoubleCalculating { | |
public enum Actions { | |
SUM, | |
SUBTRACTION, | |
MULTIPLY, | |
DIVIDE | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
import java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
public class StringFileReader { | |
public static final String OUT_FILE_PATH = "./output.txt"; | |
public static String FileReader(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
import java.util.Scanner; | |
public class StringCalcScanner { | |
public String scanString() { | |
Scanner sign = new Scanner(System.in); | |
String mySign = sign.nextLine(); | |
return mySign; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
public class StringCalculator { | |
public static void main(String[] args) { | |
StringCalcScanner scanner = new StringCalcScanner(); | |
while (true) { | |
System.out.println("Please, enter Your choice '1'(read from file) or '2'(manual input) or '3' to exit: "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
public class Calculator { | |
// public static String num1 = null; | |
public static String num2 = null; | |
public static double v1 = 0; | |
public static double value2 = 0; | |
public static double ChooseCalculateMethod = 0; | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
import sun.applet.Main; | |
import sun.rmi.runtime.Log; | |
import java.io.*; | |
public class New { | |
public static final String OUT_FILE_PATH = "./output.txt"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package array; | |
import java.util.Arrays; | |
public class Swap { | |
public static void main(String[] args) { | |
int[] data1 = {1,2,3,4,5}; | |
System.out.println("before " + Arrays.toString(data1)); | |
swap(data1); | |
int[] data2 = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package forEach; | |
import java.util.Arrays; | |
public class SwapMe { | |
public static void main(String[] args) { | |
int[] data1 = {1,2,3,4,5}; | |
System.out.println("before " + Arrays.toString(data1)); |
NewerOlder