/* * Aresh Saharkhiz * saharkiz@gmail.com * Associate Professor / Mapua Institute of Technology / Philippines */ using System; // Introduction to Software Testing // Authors: Paul Ammann & Jeff Offutt // Chapter 3, section 3.3, page 130 internal class checkIt_class { public static void checkIt(bool a, bool b, bool c) { if (a && (b || c)) { Console.WriteLine("P is true"); } else { Console.WriteLine("P isn't true"); } } public static void Main(string[] argv) { // Driver method for checkIt // Read an array from standard input, call checkIt() bool[] inArr = new bool[argv.Length]; if (argv.Length != 3) { Console.WriteLine("Usage: java checkIt v1 v2 v3"); return; } for (int i = 0; i < argv.Length; i++) { inArr[i] = Convert.ToBoolean(argv[i]); } checkIt(inArr[0], inArr[1], inArr[2]); } }