GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Consider the following class definition where a circle is re…

Consider the following class definition where a circle is represented just by its radius: class Circle{   private:      double radius;   public:      double scaled_area(double factor) const;}; What does const mean here?

Read Details

The following function definition requires two  input parame…

The following function definition requires two  input parameters: str1 and str2. Choose the best and correct parameter definition to fill in the blank in the code below. void do_something(______________________________) {   if (str1.length() > 5 && str2.length() > 10) {      if (str1[0] == ‘a’) {         str1.replace(1, 2, str2.substr(3, 5));      }      else {         str1[0] = ‘z’;      }   }}

Read Details

Using correct C++ syntax, write the definition for a class c…

Using correct C++ syntax, write the definition for a class called Person which ONLY contains four public class attributes: name (string), age (integer), height (integer), and bank balance (double). Do not define any member functions.

Read Details

Consider this declaration and initialization: string str = “…

Consider this declaration and initialization: string str = “cse1222” ; What is the evaluation of the expression: str.substr(1, 3)?

Read Details

What is the LAST value that is output to the screen (by the …

What is the LAST value that is output to the screen (by the cout statement) at the end of execution of the following code? Trace the code line-by-line. Use the Proctorio whiteboard as scratch space, if needed. int val(2);while (val > 0) {  cout

Read Details

Go to zyBooks by following the zyBooks Table of Contents (Cl…

Go to zyBooks by following the zyBooks Table of Contents (Click to subscribe) link on Course Information (right click on the previous link and open in a new Tab/Window so that you do not leave the quiz). In ZyBooks, complete lab 16.10: Final Exam (Version 1). Enter the following password to enter the zyLab: #5EV3F$Wm Submit in “Submit mode” by clicking “Submit for grading” multiple times as you develop your solution. When you have arrived at your final solution: Submit using “Submit for grading” one more time. You do not need to copy the code here, but you need to make sure you stop working on ZyBooks when your quiz time is done

Read Details

Given the following class definition: class Rectangle{  priv…

Given the following class definition: class Rectangle{  private:    double width;    double height;  public:    void setWidth(const double w);    void setHeight(const double h);    double getWidth() const;    double getHeight() const;}; Write the complete definition of the member function getWidth that includes the function header and code to implement the function.

Read Details

Why should you not compare variables of type double using th…

Why should you not compare variables of type double using the == operator?

Read Details

Go to zyBooks by following the zyBooks Table of Contents (Cl…

Go to zyBooks by following the zyBooks Table of Contents (Click to subscribe) link on Course Information (right click on the previous link and open in a new Tab/Window so that you do not leave the quiz). In ZyBooks, complete lab 27.9 Quiz 7: Creating your own functions. Enter the following password to enter the zyLab: Fp$M84Yq2 Submit in “Submit mode” by clicking “Submit for grading” multiple times as you develop your solution. When you have arrived at your final solution: Submit using “Submit for grading” one more time. You do not need to copy the code here, but you need to make sure you stop working on ZyBooks when your quiz time is done

Read Details

Consider the following code using constants that calculates…

Consider the following code using constants that calculates the speed of a falling object as a function of how long it has been falling:  const double GRAVITY; // acceleration [m / s^2] double time(10.0); // time, in sec cout

Read Details

Posts pagination

Newer posts 1 … 30,874 30,875 30,876 30,877 30,878 … 83,191 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top