ASSIGNMENT (4) USING AND MANIPUPATING ARRAYS (Chapter 10 material)
For this assignment you are to:
1) Create and manage arrays
a) One of type integers (containing 10 elements).
b) One of type strings (containing 20 elements).
c) One of type char (containing 30 elements).
2) Search them using (linear AND binary) methods.
3) Sort the arrays. (Selection Sort) From CH(10).
4) Display various results from the (searching/sorting) to standard
output.
YOU ARE FREE TO CHOOSE WHATEVER METHODS YOU WANT FOR THE INPUT
(FILE/STANDARD INPUT).
ATHOUGH FILES MAKE FOR EASIER
TESTING.
FOR THE TESTING/SEARCHING OF THE CHAR array, you should
#include<ctype. h>
and calculate the number of letters/digits in the array.
EXAMPLE:
char x[10] = {'A','a','9','~ ','1','2','3',' Z','G','T');
output would be:
5 alpha characters
4 digit characters
1 non-alphanumeric character.
SKELETON CODE:
#include<iostre am>
#include<fstrea m>
#include<string >
#include<ctype. h>
using namespace std;
I dont get this at all. Its for my class, the input can be a file or
just ask when the program is run. the out put can be in a file or on
the screen as well. It doesnt need to sort all three, just one at a
time. I figure the best bet is to do it as three seperate programs?
so that you do one, it outputs it, do another, output it so on so
forth. Can any one get me started on this please.
For this assignment you are to:
1) Create and manage arrays
a) One of type integers (containing 10 elements).
b) One of type strings (containing 20 elements).
c) One of type char (containing 30 elements).
2) Search them using (linear AND binary) methods.
3) Sort the arrays. (Selection Sort) From CH(10).
4) Display various results from the (searching/sorting) to standard
output.
YOU ARE FREE TO CHOOSE WHATEVER METHODS YOU WANT FOR THE INPUT
(FILE/STANDARD INPUT).
ATHOUGH FILES MAKE FOR EASIER
TESTING.
FOR THE TESTING/SEARCHING OF THE CHAR array, you should
#include<ctype. h>
and calculate the number of letters/digits in the array.
EXAMPLE:
char x[10] = {'A','a','9','~ ','1','2','3',' Z','G','T');
output would be:
5 alpha characters
4 digit characters
1 non-alphanumeric character.
SKELETON CODE:
#include<iostre am>
#include<fstrea m>
#include<string >
#include<ctype. h>
using namespace std;
I dont get this at all. Its for my class, the input can be a file or
just ask when the program is run. the out put can be in a file or on
the screen as well. It doesnt need to sort all three, just one at a
time. I figure the best bet is to do it as three seperate programs?
so that you do one, it outputs it, do another, output it so on so
forth. Can any one get me started on this please.
Comment