Your goal is to implement a generic “String” class using char array. Please also write down the test code to drive all functions of your class implementation
class String{
private: //think about private members
public: //give definitions of following functions
String(); -default constructor
String(char *str); -initializes string with constant cstring
String(const String &); -copy constructor
String(int x); -initialize string of pre-defined size
void setAt(int i, char c); -set character at index [x]
String substr(int pos, int len); -return substring of length len from ‘pos’
String substr(int pos); -return substring from given position to end
\void append(String str ); -append a String at end of string
void append(char *str ); -append a constant c string at end of string
char * tocstring(); -convert String to c-string
void display(); -display string
bool isEmpty(); -return true if string is empty
void copy(const String&); -copy one string to another
void copy(const char *); -copy cstring to String
};
A researcher claims that the average salary of a private school teacher is greater than P35,000 with
a standard deviation of P7,000. A sample of 35 teachers has a mean salary of P37,000. Test the
claim of the researcher. At 0.05 level of significance, test the claim of the researcher.
Write a program to count and print even values between 0 and 20:
Sample Output
The Total even numbers between 0 and 20 exclusives is 10
A researcher claims that the average salary of a private school teacher is greater than P35,000 with
a standard deviation of P7,000. A sample of 35 teachers has a mean salary of P37,000. Test the
claim of the researcher. At 0.05 level of significance, test the claim of the researcher.
A researcher claims that the average salary of a private school teacher is greater than P35,000 with
a standard deviation of P7,000. A sample of 35 teachers has a mean salary of P37,000. Test the
claim of the researcher. At 0.05 level of significance, test the claim of the researcher.
A researcher claims that the average salary of a private school teacher is greater than P35,000 with
a standard deviation of P7,000. A sample of 35 teachers has a mean salary of P37,000. Test the
claim of the researcher. At 0.05 level of significance, test the claim of the researcher.
Global warming is becoming a serious problem for mankind. According to the Coase Theorem government should leave this matter to the market to solve. Do you agree? Argue your case with the aid of economic theory.
Directions: Read the problems below and do what is asked. Write your answers on a separate sheet of paper.
2. The average zone of inhibition (in mm) for mouthwash L as tested by the medical technology students has been known to be 9mm. A random sample of 10 mouthwash L was tested and the test yielded an average zone of inhibition of 7.5mm with a variance of 25 mm. Is there enough reason to believe that the anti-bacterial property of the mouthwash has decreased? Test the hypothesis that the average zone of inhibition of the mouthwash is no less than 9mm using 0.05 level of significance.
A. State the hypotheses.
B. Determine the test statistic to use.
C. Determine the level of significance, critical value, and the decision rule.
D. Compute the value of the test statistic.
E. Make a decision.
F. Draw a conclusion.
Random samples with size 4 are drawn from the population containing the values 14, 19, 26, 31, 48 and 53
Directions: Read the problems below and do what is asked. Write your answers on a separate sheet of paper.
1. The records of SCA Registrar show that the average final grade in Mathematics for STEM students is 91 with a standard deviation of 3. A group of student-researchers found out that the average final grade of 37 randomly selected STEM students in Mathematics is no longer 91. Use 0.05 level of significance to test the hypothesis and a sample mean within the range of 88 to 94 only.
A. State the hypotheses.
B. Determine the test statistic to use.
C. Determine the level of significance, critical value, and the decision rule.
D. Compute the value of the test statistic.
E. Make a decision.
F. Draw a conclusion.