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
If a company gave you a free version of their software and encouraged you to try and improve it and share it with the only commu
dimulka [17.4K]

Answer:

Explanation:

crm

8 0
2 years ago
What is the highest numeral in a binary code?
Anarel [89]

Answer:

The highest numeral in binary code is 1

In binary, you can only have 1s and 0s

if you're asking for the biggest number that can be represented, it's 255, which is 11111111. (this is 8 1s)

Explanation:

Is this a trick question? lol

May I have brainliest please? :)

5 0
2 years ago
In JAVA please:
blagie [28]

Answer:

import java.util.Scanner;

public class ArraysKeyValue {

public static void main (String [] args) {

final int SIZE_LIST = 4;

int[] keysList = new int[SIZE_LIST];

int[] itemsList = new int[SIZE_LIST];

int i;

keysList[0] = 13;

keysList[1] = 47;

keysList[2] = 71;

keysList[3] = 59;

itemsList[0] = 12;

itemsList[1] = 36;

itemsList[2] = 72;

itemsList[3] = 54;  

/* Your solution goes here */

for ( i = 0; i < SIZE_LIST; i++){

 if (keysList[i]>50){

  System.out.println(itemsList[i] + " ");  }  }

System.out.println("");

}

}

Explanation:

I will explain the whole program flow.

  • There are two arrays here
  • keysList and itemsList
  • The first list (keysList) contains the following elements:

13 element at first position of the array (0th index)

47 element at second  position of the array (1st index)

71 element at third position of the array (2nd index)

59 element at fourth position of the array (3rd index)

  • The other list (itemsList) contains the following elements:

12 element at first position of the array (0th index)

36 element at second  position of the array (1st index)

72 element at third position of the array (2nd index)

54 element at fourth position of the array (3rd index)

  • The size of the array elements is fixed which is 4 and is stored in the variable SIZE_LIST.
  • Then the loop starts. The loop contains a variable i which is initialized to 0. First it checks if the value of i is less than the size of the list. It is true as SIZE_LIST=4 and i=0.
  • So the program control enters the body of the loop.
  • In first iteration, IF condition checks if the i-th element of the keysList is greater than 50. As i=0 So the element at 0th index of the keysList is 13 which is not greater than 50 so the body of IF statement will not execute as the condition evaluates to false. The value of i increments by 1 so now i becomes 1.
  • In next iteration loop again checks if the value of i is less than the size of the list which is true again so the body of the loop executes.
  • IF condition checks if the i-th element of the keysList is greater than 50. As i=1 So the element at 1st index of the keysList is 47 which is not greater than 50 so the body of IF statement will not execute as the condition evaluates to false. The value of i is incremented by 1 so now i becomes 2.
  • In next iteration loop again checks if the value of i is less than the size of the list which is true again as i= 2 which is less than SIZE_LIST so the body of the loop executes.
  • IF condition checks if the i-th element of the keysList is greater than 50. As i=2 So the element at 2nd index of the keysList is 71 which is greater than 50 so the body of IF statement is executed as the condition evaluates to true. So in the body of the IF statement there is a print statement which prints the i-th element of the itemsList. As i = 2 so the value at the index 2 of the itemsList is displayed in the output which is 72. Next value of i is incremented by 1 so now i becomes 3.
  • In next iteration loop again checks if the value of i is less than the size of the list which is true again as i= 3 which is less than SIZE_LIST so the body of the loop executes.
  • IF condition checks if the i-th element of the keysList is greater than 50. As i=3 So the element at 3rd index of the keysList is 59 which is greater than 50 so the body of IF statement is executed as the condition evaluates to true. So in the body of the IF statement there is a print statement which prints the i-th element of the itemsList. As i = 3 so the value at the index 3 of the itemsList is displayed in the output which is 54. Next value of i is incremented by 1 so now i becomes 4.
  • In next iteration loop again checks if the value of i is less than the size of the list which is now false as i=4 which is equal to the SIZE_LIST= 4. So the loop breaks.
  • So the output of the above program is:

72

54

5 0
3 years ago
In order to consolidate your theoretical knowledge into technique and skills with practical and applicational value, you will us
Arisa [49]

Answer:

Check the explanation

Explanation:

Lasso: R example

To run Lasso Regression you can re-use the glmnet() function, but with the alpha parameter set to 1.

# Perform 10-fold cross-validation to select lambda --------------------------- lambdas_to_try <- 10^seq(-3, 5, length.out = 100) # Setting alpha = 1 implements lasso regression lasso_cv <- cv.glmnet(X, y, alpha = 1, lambda = lambdas_to_try, standardize = TRUE, nfolds = 10) # Plot cross-validation results plot(lasso_cv)

Best cross-validated lambda lambda_cv <- lasso_cv$lambda.min # Fit final model, get its sum of squared residuals and multiple R-squared model_cv <- glmnet(X, y, alpha = 1, lambda = lambda_cv, standardize = TRUE) y_hat_cv <- predict(model_cv, X) ssr_cv <- t(y - y_hat_cv) %*% (y - y_hat_cv) rsq_lasso_cv <- cor(y, y_hat_cv)^2 # See how increasing lambda shrinks the coefficients -------------------------- # Each line shows coefficients for one variables, for different lambdas. # The higher the lambda, the more the coefficients are shrinked towards zero. res <- glmnet(X, y, alpha = 1, lambda = lambdas_to_try, standardize = FALSE) plot(res, xvar = "lambda") legend("bottomright", lwd = 1, col = 1:6, legend = colnames(X), cex = .7)

Kindly check the Image below.

5 0
2 years ago
How to learn python ?
laila [671]

Answer:

https://www.python.org/about/gettingstarted/

Explanation:

its a site i used

7 0
2 years ago
Other questions:
  • Gina's teacher has sent her a Word document that contains the names of all the students who are participating in the
    11·2 answers
  • Deon is required to provide the citation information for his sources. What type of information should he collect from his source
    10·2 answers
  • A customer in a store is purchasing 5 items. Write a python program that asks for the price of each item and display the subtota
    14·1 answer
  • Explain in a few sentences the difference between analytical papers and argumentative papers.
    8·2 answers
  • Which one of these is correct PI of a XML document?
    13·1 answer
  • In this scenario, hackers launch cyber-attacks that affect several parts of the nationâs financial infrastructure over the cours
    8·1 answer
  • Write a program that performs the following tasks: Display a friendly greeting to the user Prompt the user for the value to conv
    13·1 answer
  • Write a program that ask the user to enter air water or Steele and the distance that a sound wave will travel in the medium the
    9·1 answer
  • Secondary hard drive whats its purpose
    5·1 answer
  • Clicking the ____ opens the insert function dialog box.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!