1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ziro4ka [17]
3 years ago
12

Write a C class, Flower, that has three member variables of type string, int, and float, which respectively represent the name o

f the flower, its number of pedals, and price. Your class must include a constructor method that initializes each variable to an appropriate value, and your class should include functions for setting the value of each type, and getting the value of each type.
Computers and Technology
1 answer:
Ulleksa [173]3 years ago
3 0

Answer and Explanation:

C is a low level language and does not have classes. The language isn't based on object oriented programming(OOP) but is actually a foundation for higher level languages that adopt OOP like c++. Using c++ programming language we can implement the class, flower, with its three variables/properties and functions/methods since it is an object oriented programming language.

You might be interested in
A port is the point at which a peripheral device attaches to or communicates with a computer or mobile device. True False
soldier1979 [14.2K]

Answer:

True

Explanation:

Computer is a device that is electronically designed to receive input, execute task on the input and give an output or resultant value. It's electronic hardware components are driven by a central software called the operating system. Input, output, memory and storage, and processor units are categories of the hardware components of the computer.

Peripheral hardware devices are externally attached to a computer system to maximise it's functionality. They are connected through extensions like ports, PCIe extensions etc.

5 0
3 years ago
Write a function (subroutine) that inputs a data value in register r0 and returns value in r0. The function returns y 5 a 1 bx 1
umka2103 [35]

Solution :

  int f(int x){

      \text{return a + b*x +c*x*x};

  }*/

  int f(\text{int R0}){

      int stack[2] = {\text{R1,R2}};

      \text{R1 = R0};

      \text{R1 = R1}\times \text{ R1};

      \text{R2 = C};

      R1 = R1 * C; /*R1 = cx^2*/

      \text{R2 = B};

      \text{R0 = R0} * R2; /* R0 = bx */

      \text{R0 = R0 + R1}; /*R0 = bx + cx^2 */

      \text{R2 = C};

      \text{R0 = R0 + R2}; /*R0 = a+bx+cx^2 */

      \text{R1 = stack[0];}

     \text{ R2 = stack[1];}

     \text{ return R0;}

  }

  /*\text{ARM code to implement the following C operation}

  int s=0;

  \text{for ( i = 0; i < 10; i++)}

  { \text{s = s + i } \times i;)

  */

          AREA SumSquares, code, readWrite

          ENTRY

          \text{MOV r0, #0}        ;loop \text{ counter i present at 0}

          MOV r1, #0       ; s = 0

  Loop   \text{MUL r2, r0, r0}   ;calculate i*i

          \text{ADD r1, r1, r2}   ;s = s+ i*i

          \text{ADDS r0, r0}, #1   ; i = i+1

          \text{CMP r0},#10       ; test for end

          \text{BNE} Loop        ; \text{continue until all added}

          END

5 0
3 years ago
1.How does inertia affect a person who is not wearing a seatbelt during a collision?
KIM [24]
1. during a collision, the person not wearing a seatbelt is already in motion. there is no outside force (the seatbelt) to stop this motion. 
2. Kinetic Energy = 0.5 * m * v^2  because velocity is a squared term, doubling the velocity actually quadruples the kinetic energy, making the stopping distance much much greater
3. by the same logic as above, mass is not a squared term, therefore doubling the mass will double the kinetic energy, increasing the stopping distance -- but by not as much as increasing the velocity.
4. because a driver cannot alter the mass of his vehicle, the best way to enter sharp curves would be decreasing velocity (speed)
5. there are many factors that determine the degree of damage (to humans and property in a crash), most notably the size of the vehicle(s) and velocity.
6 0
3 years ago
What is the difference between First Person Shooters and Construction Simulations?
Marianna [84]

Answer:No clue

Explanation:

5 0
3 years ago
Read 2 more answers
List three types of cardinalities for relationships within a relational database.
Afina-wow [57]
This is about identifiers in a record referring to other records.
You can have many to one, one to one, many to many.

E.g., if you have two tables, Authors and Books, then a book record could have a reference to an author record. Since an author can write many books, this would be a many-to-one relationship.


3 0
3 years ago
Other questions:
  • For each of these statements find a domain for which the statement is true and a domain for which the statement is false. a) Eve
    13·1 answer
  • You have just installed a new sound card in your system, and Windows says the card installed with no errors. When you plug up th
    5·1 answer
  • A lack of financial literacy can cause you to lose your
    10·1 answer
  • The merge sort algorithm sorts using what technique?
    8·1 answer
  • Gemima wants to order the different kinds of food alphabetically on the table. Which actions should she take? Check all that app
    8·2 answers
  • What icon is usually used to indicate an attachment feature?
    14·2 answers
  • ____________________ is the primary code humans use to communicate. (Points : 1
    9·1 answer
  • PLEASE HELP
    5·1 answer
  • Calculate the total and average number from 1 to 100<br>​
    12·1 answer
  • What is multimedia hard ware? Write any four examples of multimedia hardware. <br>​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!