Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Complete the declaration and initialization of the array variable with datatype character, char array[ ]=???;. Initialized the first index with A, the second index with T, the third index E, the fourth index N, the fifth index as E, and the sixth index as O.


Your answer's format should be a complete declaration at the same time initialization:

format: datatype array_name[ ]=???;



Answer:

The work formula measures the multiplication of magnitude of displacement (d), the component of the

orce (F), and the angle (8) between d and F. It can be obtained from the following expression:

                   W = F x d x cos(0).

  Write a program which prompts the user to enter d, F, and 0. Then, calculates W and displays

  the computed value for W on the screen. (Notice: You should include all steps and respect the

  Python syntax in order to obtain full mark).

  • Which Python built-in functions did you use to write this program?

  • Which modules in Python did you import? Which functions from the imported modules are

  applied in your program?


1.     Create a menu to execute tasks. There shall be n tasks in total, update as they comes up. You should properly prompt wherever necessary.


  1. What is the last index for an array declared and initialized as int numbers[ ] = {1,2,3,4,5,6};?
  2. What is the value of index three (3) for an array declared and initialized as int numbers[ ]={1,2,3,4,5,6};?
  3. What is the value of index two (2) for an array declared and initialized as char version = "Monterey"?
  4. What is the last index for an array declared and initialized as char version = "Monterey"?

Let us assume the program below runs smoothly, identify all function arguments in each function call in exact order and separate each argument in just a comma:


int getCube(int number){ return number * number * number;}

char getLetter(double n) {if(n>50) {return'0';} return 'X'}

double getThis(int num){return 1.0;}

int main(){

    int n1 = 10, n2 = 123;

    double vall = 123.45, val2 = 456.234;

cout << getCube(10) << " " << getCube(123) << "\n";

  cout << getLetter(val2) << "-" << getLetter(val1);

    cout << getLetter(34.23) << "--" << getThis(88);

  cout << getThis(val1);


    return 0;

}



What is the Answer? :


Let us assume the program below runs smoothly, identify all function arguments in each function call in exact order and separate each argument in just a comma:


int getCube(int number){ return number * number * number;}

char getLetter(double n) {if(n>50) {return'0';} return 'X'}

double getThis(int num){return 1.0;}

int main(){

    int n1 = 78, n2 = 55;

    double vall = 123.56, val2 = 784.59;

    cout << getLetter(val1) << "-" << getLetter(val1);

    cout << getLetter(val2) << "--" << getThis(val2);

    cout << getCube(123) " " << getCube(321) << "\n";

    cout << getThis(val1);


    return 0;

}




What is Answer:


1.     Write C++ statements that prompt the user to enter a person’s last name and then store the last name into the variable name.


1. Create a new project with following particulars

1.      name the project title in the following format “ID_section_lab#” e.g., “f2019065111_w1_lab2”.

2.      Create a menu to execute tasks. There shall be n tasks in total, update as they comes up. You should properly prompt wherever necessary. A sample menu is shown below.


1.     Write a program that prompts the capacity, in gallons, of an automobile fuel tank and the miles per gallon the automobile can be driven. The program outputs the number of miles the automobile can be driven without refueling.


Write a Java class Complex for dealing with complex number. Your class must have the following features:

  • Instance variables :
  • realPart for the real part of type double
  • imaginaryPart for imaginary part of type double.
  • Constructor:

o   Having no parameter – for setting values to zero or null.

o   Having two parameters for assigning values to both data members.

o   Overload the above constructor and use this keyword to set the values of data members

  • Instance methods:
  • public void setRealPart (double realPart): Used to set the real part of this complex number.
  • public void setImaginaryPart (double realPart): Used to set the imaginary part of this complex number.
  • public double getRealPart(): This method returns the real part of the complex number
  • public double getImaginaryPart(): This method returns the imaginary part of the complex number
  • public String toString(): This method allows the complex number to be easily printed out to the screen
LATEST TUTORIALS
APPROVED BY CLIENTS