Create a class student which stores name, date-of-birth and date-of-joining of a student. The data members date-of-birth and date-of-joining should be the objects of another class called 'date'. Input the data for 10 students and display it.
Kindly answer this as soon as possible. Very urgent. And need a correct answer.
The program does 2 + 2; I need the program do 3 * 2; and 3 / 2; and 3^2;
The code is already written. You need to fix the code, so it accepts *, / and ^ operations need to add multiplication, addition, and power.
You can access the code via the link given below. Thanks
https://drive.google.com/file/d/1NoVc1HNT9kPNJhnFg0x2V44tak9C0x4c/view?usp=sharing
WAP to declare a class which stores a complex number. Include a member function which compares the modulus of the two complex class objects and returns the object with higher value. Include a parameterized constructor which arguments with same name as that of the class data members.
Activity #5 – Applying Functions
The output of this activity will be the same as activity #3 but instead you are
required to use a function for the following algorithm:
1. A function for getting the length of each string
2. A function to get the shortest string
3. And a function to get the longest string
Assume that each string has its own unique length.
Sample Run:
Sample Run A
Enter value of X: 3
Enter string value: a
Enter string value: ab
Enter string value: abc
a - total length is 1
ab - total length is 2
abc - total length is 3
The shortest string is 1
The longest string is 3
Sample Run B
Enter value of X: 4
Enter string value: chico
Enter string value: strawberry
Enter string value: banana
Enter string value: guyabano
chico - total length is 5
strawberry - total length is 10
banana - total length is 6
guyabano - total length is 8
The shortest string is chico
The longest string is strawberry
Activity #3 – Strings and Lengths
Create a program that will accept an integer X from the user, followed by X
number of strings. The program will then print each string followed by the length of
each string. Then the program will print the shortest and the longest string.
Assume that each string has its own unique length.
Sample Run:
Sample Run A
Enter value of X: 3
Enter string value: a
Enter string value: ab
Enter string value: abc
a - total length is 1
ab - total length is 2
abc - total length is 3
The shortest string is a
The longest string is abc
Sample Run B
Enter value of X: 4
Enter string value: chico
Enter string value: strawberry
Enter string value: banana
Enter string value: guyabano
chico - total length is 5
strawberry - total length is 10
banana - total length is 6
guyabano - total length is 8
The shortest string is chico
The longest string is strawberry
Activity #2 – Smallest and Divisibility
Create a program that will accept 3 integers from the user. Then the program
will print the smallest integer.
The program will also check if the average of the 3 numbers are divisible by 2, 3,
4 and 5. Each divisibility check will output either “The average is divisible by X” or
“The average is not divisible by X”. Each output is separated by a new line.
If the average is not divisible by 2, 3, 4 and 5 the program must output “The
average is not divisible by 2, 3, 4 and 5”.
Sample Run:
Sample Run A
Enter first value: 2
Enter second value: 5
Enter third value: 9
Smallest value is 2
The average is nor divisible by 2
The average is not divisible by 3
The average is not divisible by 4
The average is divisible by 5
Sample Run B
Enter first value: 13
Enter second value: 14
Enter third value: 13
Smallest value is 13
The average is not divisible by 2, 3, 4 and 5