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
| import java.util.Scanner; | |
| public class AnyString { | |
| private String str; | |
| // Two constructors for string method intialized to accept strings and character array | |
| public AnyString(String str) { | |
| this.str = str; |
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
| import java.util.Scanner; | |
| class AnyStringz { | |
| String input = ""; | |
| public AnyStringz(String b){ | |
| //reassign input to b | |
| this.input = b; |
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
| public class CalculatePI { | |
| public static void main(String [] args){ | |
| // 1. piSum is the variable to contain the PI calculation | |
| double piSum = 0.0; | |
| double piNumer = 1.0; | |
| double piDenom = 1.0; | |
| double mathPi = Math.PI; | |
| // 2. n will count the iterations |
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
| public class CalculatePI { | |
| public static void main(String [] args){ | |
| // 1. piSum is the variable to contain the PI calculation | |
| double piSum = 0.0; | |
| double piNumer = 1.0; | |
| double piDenom = 1.0; | |
| double mathPi = Math.PI; | |
| // 2. n will count the iterations |
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
| public class CalculatePI { | |
| public static void main(String [] args){ | |
| // 1. piSum is the variable to contain the PI calculation | |
| double piSum = 0.0; | |
| double piNumer = 1.0; | |
| double piDenom = 1.0; | |
| double mathPi = Math.PI; | |
| // 2. n will count the iterations |
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
| public class CalculatePI { | |
| public static void main(String [] args){ | |
| // 1. piSum is the variable to contain the PI calculation | |
| double piSum = 0.0; | |
| double piNumer = 1.0; | |
| double piDenom = 1.0; | |
| double mathPi = Math.PI; | |
| // 2. n will count the iterations |
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
| ///////////////////////// | |
| // | |
| // Name: | |
| // Class: | |
| // Project: Assignment 4 | |
| // Date: 9/13/2016 | |
| // | |
| //////////////////////// | |
| public class CalculatePI { |