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]
4 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]4 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
g write a recursive function that prints out all the even numbers between x and y inclusive if x is odd then the print out will
Reil [10]

Answer:

The function written in python is as follows:

def EvenNumbers(x, y):

    if (y < x):

         return

    if (y % 2 == 0):

         EvenNumbers(x, y - 2)

    else:

         EvenNumbers(x, y - 1)

    if (y % 2 == 0):

         print(y)

Explanation:

x represents the lower limit while y represents the upper limit.

So, the recursion will be repeated as long as x <= y

This defines the function

def EvenNumbers(x, y):

This checks if y < x. If yes, the recursion stops execution and return to the main

<em>     if (y < x): </em>

<em>          return </em>

The following if and else condition checks determines the appropriate range of the recursion.

<em>     if (y % 2 == 0): </em>

<em>          EvenNumbers(x, y - 2) </em>

<em>     else: </em>

<em>          EvenNumbers(x, y - 1) </em>

The above takes care of printing starting at x + 1 if x is odd

This checks and prints the even numbers in the range

<em>     if (y % 2 == 0): </em>

<em>          print(y)</em>

<em />

To call the function from main, make use of

EvenNumbers(x, y)

Where x and y are integers

e.g EvenNumbers(2,10), EvenNumbers(1,17), EvenNumbers(3,21)

<em>See attachment</em>

3 0
3 years ago
In most signal "timing diagrams" (like the one below) the signals do not change from low to high, or from high to low, abruptly.
melisa1 [442]

Explanation:

This transient state occurs due to the fact that the signal change from low to high and high to low doesn't occur intermediately but in a very small time, in relation to the signal time itself.

At transistor level there are parasitic (undesired) capacitances and resistances, formed due to the layout configuration of conductor and dielectrics. As consequence a RC circuit is formed, thus making a propagation delay.

This delay must be characterized for each circuit, and specified as tpHL (transition time from High to Low) and tpLH (transition time from Low to High)

8 0
3 years ago
Assume that programs spend about 25% of their time waiting for I/O operations to complete. If there are FOUR programs loaded int
natima [27]

Answer:

0.9961

Explanation:

Given that:

Proportion of time waiting for I/O operation to complete = 25% = 0.25

Number of programs waiting in memory = 4

Using the CPU Utilization formula :

CPU Utilization = 1 - p^n

1 - 0.25^4

1 - 0.00390625

0.99609375

5 0
3 years ago
Every character, number, or symbol on the keyboard is represented as a _____ in computer memory.
Lorico [155]
Every character, number, or symbol on the keyboard is represented as a binary number in computer memory.
3 0
3 years ago
Read 2 more answers
Add -9 and -7 using 2nd compliment
zlopas [31]

Explanation:

-16

hope this helped

4 0
3 years ago
Other questions:
  • HELP PLEASE! What is an acceptable use policy and what is the purpose of the acceptable use policy?
    6·1 answer
  • Where can you access all the formatting options for worksheet cells?
    5·1 answer
  • Page _____ refers to whether a page is laid out vertically or horizontally.
    12·1 answer
  • In Shoreville, the last low tide was at 12:00 a.m. About what time will the next high tide occur?
    8·2 answers
  • What permissions should you assign a group if you want the group to have the ability to read, add, delete, execute, and modify f
    12·1 answer
  • You need to write a class called SingleItemBox (in a file called SingleItemBox.java that you create). This class has a construct
    6·1 answer
  • What does place value mean with binary?
    6·1 answer
  • What is the definition of shape
    14·2 answers
  • Understanding that protection of sensitive unclassified information is:
    8·1 answer
  • A time management tool in a help desk software package probably has the greatest impact on the productivity of _____.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!