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
What are the assignable addresses for the 12th subnet with the network address of 220.100.100.0 and the number of needed subnets
bogdanovich [222]

Answer:

C. 220.100.100.45 to 220.100.100.46

Explanation:

The Classless IP subnetting of 220.100.100.0 begins from the fourth octet of the IP address. To get 45 subnet mask, it uses 6 bits from the fourth octet, which approximately give 64 subnets, while the remaining 2 bits are used for host IP addressing.

The useable host IP addresses are gotten from the formula '2^{n}-2', with n=2 bits.

useable host IP addresses = 2^2 - 2 = 2 addresses per subnet.

While the 12th subnet is 12 x 2^2 = 44.

This means that the 12th subnet mask starts with 220.100.100.44 (as the network address) and ends with 220.100.100.47 as broadcast IP address, while '.45' and '.46' are the assignable addresses of the subnet.

5 0
3 years ago
A bowl contains 20 candies; 15 are chocolate and 5 are vanilla. You select 5 at random. What is the probability that all 5 are c
Sindrei [870]

Answer: 0.1937

Explanation:

Given : A bowl contains 20 candies; 15 are chocolate and 5 are vanilla.

If we select 5 candies, then the number of ways to select them is given by permutations.

The number of ways to select 5 candies is given by :-

^{15}P_5=\dfrac{15!}{(15-5)!}=\dfrac{15\times14\times13\times12\times11\times10!}{10!}=360360

The number of ways of selecting any 5 candies out of 20:-

^{20}P_5=\dfrac{20!}{(20-5)!}\\\\=\dfrac{20\times19\times18\times17\times16\times15!}{15!}\\\\=1860480

Now, the probability that all 5 are chocolate :-

=\dfrac{360360}{1860480}=0.193691950464\approx0.1937

Hence, the probability that all 5 are chocolate =0.1937

5 0
3 years ago
Read 2 more answers
If you enjoy exploring,"what would happen if"types of questions and activities,a career in science or technology might be a good
zhannawk [14.2K]

Answer:

option (a)

Explanation:

Computer science provides millions of ways in which we can code different types of scenarios and options we can imagine. Any scenario or problem can be thought to solve using programming. So there can be thousands of ways of exploring the paths never explored. Lots of ways to counter any situation and think what if i could change this condition to another and what solution would come up.

5 0
3 years ago
WordArt ____ in the interior of a letter can consist of a solid color, texture, picture, or gradient.
Svetach [21]
WordArt fill in the interior of a letter can consist of a solid color, texture, picture, or gradient. 
3 0
3 years ago
g Boolean Algebraic properties _____. a. are used to make boolean expressions more complicated b. are used to convert a Boolean
vesna_86 [32]

Answer:

c. can lead to a simpler expression and thus a simpler circuit.

Explanation:

Boolean logic refers to a theory of mathematics developed by the prominent British mathematician, called George Boole. In Boolean logic, all variables are either true or false and are denoted by the number "1" or "0" respectively; True = 1 or False = 0.

Also, Boolean logic allow users to combine keywords with Boolean operators (quotes, AND, OR, near/n) to give a more personalized and relevant search results.

There are five (5) main Boolean Algebraic properties and these includes;

I. <u>Commutative property</u>: it applies to both multiplication and addition.

  • <em>For addition; A + B = B + A</em>
  • <em>For multiplication; A.B = B.A</em>

II. <u>Associative property</u>: it applies to both multiplication and addition.

  • <em>For addition; A + (B + C) = (A + B) + C</em>
  • <em>For multiplication; A(BC) = (AB)C</em>

III. <u>Distributive property</u>: it is formed using the product of a sum.

  • <em>A(B + C) = AB + AC</em>

IV. <u>Complement property</u>: it involves a variable and its complement.

  • <em>For addition: A + A' = 1</em>
  • <em>For multiplication; A.A' = 0</em>

V. <u>Identity property</u>:

  • <em>For addition; A + 0 = A</em>
  • <em>For multiplication; A.1 = A</em>

In digital electronics, Boolean expressions are used to represent circuits which comprises of Boolean operations and as such simplifying any logic expression without changing or altering any of it's functionalities and properties based on given operations or variables.

Hence, Boolean Algebraic properties can lead to a simpler expression and thus a simpler circuit.

3 0
3 years ago
Other questions:
  • In a database, a collection of related fields that describes some object or activity is referred to as a ____.
    9·1 answer
  • In 125 words describe the steps to active listening.
    6·1 answer
  • Create and execute a SELECT statement that would provide data for a vendor directory. Display should include vendor number, vend
    13·1 answer
  • _____________ helps to control and limit the number of consecutive request failures that cross a threshold. Review breaker Micro
    7·1 answer
  • 3. When you right-click a linked spreadsheet object, what commands do you choose to activate the Excel features?
    7·2 answers
  • Differences of a desktop computer and a laptop
    13·1 answer
  • Label provides the code that executes if no case label is matched ​
    6·1 answer
  • Suppose that a 2M x 16 main memory is built using 256kB x 8 RAM chips and memory is word addressable, how many RAM chips are nec
    6·1 answer
  • Ano ang bunga ng pagsunod sa tamang konsiyensiya?
    12·2 answers
  • HOW TO DISCONNECT A MONITOR FROM A SYSTEM UNIT
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!