Question: Part C Part C consists of an interactive program that performs rudimentary combinatoric calculators This interactive program is to be named labSc.cob. This program will
Part C Part C consists of an interactive program that performs rudimentary combinatoric calculators This interactive program is to be named labSc.cob. This program will accept parameters at run- time fiom the command line which will dictate the calculations to perform. The program does one calculation per run; it is not to ask the user if they want to peform another calculation There will be 4 command-line parameters Type of calculation to perform. Permissible values (allow any case) o CCombination" Combination o "P"r Permutation" Permutation (Ordered combination) . Are repetitions allowed. Permissible values (allow any case) .Size of the population being chosen from (integer) Number of items being chosen (integer) The program should detect the following invalid situations. In such cases, the program should display a message describing what was invalid and then terminate. Invalid number of parameters Invalid value for either of the first two parameters 4th parameter cannot be larger than the 3d one Sample sessions (user input in bold): Lab80 p y 6 4 Number of Permutations 1,296 Lab8c Permutation n 16 3 Nunber of Permutations- 3, 360 Lab8c c y53 Number of Combinations 35 Lab8c combination N 16 3 Number of Combinations 560 Lab8c Requires 4 parameters Lab8c p n Requires 4 parameters Lab8c no no 2 1 First paraneter is invalid Lab8c c y 12 15 sth pazaneter cannot be larger than the 3rd parameter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
