Answer:
Answered below
Explanation:
# Program is written in Java
class WeekHours{
double school;
double fun;
double sleep;
double sports;
WeekHours( ){
school = 0.0;
fun = 0.0;
sleep = 0.0;
sports = 0.0;
}
public void setSchool ( double x){
school = x;
}
public void setFun( double y){
fun = y;
}
public void setSleep( double w){
sleep = w;
}
public void setSports( double z){
sports = z;
}
public void totalHours(){
double tHours = school + fun + sleep + sports;
System.out.print(tHours);
}
}
Answer:
Code is provided in the attachment form
Explanation:
Vector Multiplication code:
Vector_multiplication.c file contains C code.
See attachment no 1 attached below
Classification of Algorithm: For creating elements in vector c of size n, number of scalar multiplications is equal to n. The size of original two vectors scales directly with the number of operations. Hence, it is classified as O(n).
The answer is Tags, sorry about putting the other answer misread question.