Ace - AI Tutor
Ask Our Educators
Textbooks
My Library
Flashcards
Scribe - AI Notes
Notes & Exams
Download App
brian barrio

brian b.

Divider

Questions asked

BEST MATCH

Quentin has been a competitive swimmer all his life, and recently has cut back on some of his other activities to increase the time he has for aquatic training. Quentin's behavior is an example of O a midlife crisis. O abridge job. O burnout. O selective optimization.

View Answer
divider
BEST MATCH

Checkpoint 3 Three Carnot engines operate between reservoir temperatures of (a) 400 and 500 K . (b) 600 and 800 K , and (c) 400 and 600 K . Rank the engines according to their thermal efficiencies, greatest first.

View Answer
divider
BEST MATCH

43 1 point What causes gene duplications? None of these choices are correct Deletion of important genetic information Position effect Reciprocal translocations Crossing over of misaligned chromosomes

View Answer
divider
BEST MATCH

A company called Digicomparts manufactures 52 types of unique products for laptop and deep computers. It manufactures 10 types of laptop products and 42 types of desktop products. Each product manufactured by the company has a unique productID from a-z and A-Z. The laptop products have productIDs (a, i, e, o, u, A, I, E, O, U) while the rest of the productIDs are assigned to the desktop products. The company manager wishes to find the sales data for the desktop products. Given a list of productIDs of the sales of the last N products, write an algorithm to help the manager find the productIDs of the desktop products. Input The first line of the input consists of an integer - numOfProducts, representing the number of products to be considered in the sales data (N). The second line consists of N space-

View Answer
divider
BEST MATCH

QUESTION 17 The insertion for the vastus lateralis is as follows: (if needed, use your mini skeleton model for a visual reference) a. Fibular head b. Posterior surface of the medial tibial condyle. c. Anteromedial aspect of the proximal tibia d. Posterior calcaneus via achilles tendon e. Tibial tuberosity via the quadriceps/patellar tendons

View Answer
divider
BEST MATCH

Shapes.1.cpp #include #include #include #include #include #include using namespace std; void calculateSquare(double side) { double area = side * side; double perimeter = 4 * side; cout << "SQUARE side=" << side << " area=" << area << " perimeter=" << perimeter << endl; } void calculateRectangle(double length, double width) { double area = length * width; double perimeter = 2 * (length + width); cout << "RECTANGLE length=" << length << " width=" << width << " area=" << area << " perimeter=" << perimeter << endl; } void calculateCircle(double radius) { double area = M_PI * radius * radius; double perimeter = 2 * M_PI * radius; cout << "CIRCLE radius=" << radius << " area=" << area << " perimeter=" << perimeter << endl; } void calculateCube(double side) { double surfaceArea = 6 * side * side; double volume = side * side * side; cout << "CUBE side=" << side << " surface area=" << surfaceArea << " volume=" << volume << endl; } void calculateBox(double length, double width, double height) { double surfaceArea = 2 * (length * width + length * height + width * height); double volume = length * width * height; cout << "BOX length=" << length << " width=" << width << " height=" << height << " surface area=" << surfaceArea << " volume=" << volume << endl; } void calculateCylinder(double radius, double height) { double surfaceArea = 2 * M_PI * radius * (radius + height); double volume = M_PI * radius * radius * height; cout << "CYLINDER radius=" << radius << " height=" << height << " surface area=" << surfaceArea << " volume=" << volume << endl; } void calculatePrism(double side, double height) { double area = (sqrt(3) / 4) * side * side; double surfaceArea = 3 * area + 2 * side * height; double volume = area * height; cout << "PRISM side=" << side << " height=" << height << " surface area=" << surfaceArea << " volume=" << volume << endl; } void handleInvalidObject(const string& objectName) { cout << objectName << " invalid object" << endl; } int main() { ifstream inputFile("Shapes.input.txt"); string line; while (getline(inputFile, line)) { if (line.empty()) { continue; } istringstream iss(line); string shape; iss >> shape; if (shape == "SQUARE") { double side = 0; iss >> side; if (side > 0) { calculateSquare(side); } else { handleInvalidObject("SQUARE"); } } else if (shape == "RECTANGLE") { double length = 0, width = 0; iss >> length >> width; if (length > 0 && width > 0) { calculateRectangle(length, width); } else { handleInvalidObject("RECTANGLE"); } } else if (shape == "CIRCLE") { double radius = 0; iss >> radius; if (radius > 0) { calculateCircle(radius); } else { handleInvalidObject("CIRCLE"); } } else if (shape == "CUBE") { double side = 0; iss >> side; if (side > 0) { calculateCube(side); } else { handleInvalidObject("CUBE"); } } else if (shape == "BOX") { double length = 0, width = 0, height = 0; iss >> length >> width >> height; if (length > 0 && width > 0 && height > 0) { calculateBox(length, width, height); } else { handleInvalidObject("BOX"); } } else if (shape == "CYLINDER") { double radius = 0, height = 0; iss >> radius >> height; if (radius > 0 && height >= 0) { calculateCylinder(radius, height); } else { handleInvalidObject("CYLINDER"); } } else if (shape == "PRISM") { double side = 0, prismHeight = 0; iss >> side >> prismHeight; if (side > 0 && prismHeight >= 0) { calculatePrism(side, prismHeight); } else { handleInvalidObject("PRISM"); } } else { handleInvalidObject(shape); } } inputFile.close(); return 0; } ** We started introducing the Object-Oriented concepts.You will define struct s in this assignment,but DON'T include any inheritance relationship.We will gradually improve the Shapes project step by step in the future assignments In the Shapes v.1 an input file was read and processed line-by-line.For possible use in a GUI program later,it would be important to read all of the input without immediate processing,and to process it all afterwards -- perhaps several times (for example, in a GUI window's "paint" function as the user pans and zooms). So to make that easier,the shapes described in the input file should be read,parsed,made into objects,and stored in a bag.Afterwards,the objects can be retrieved from the bag and we can use their supporting functions to output their metrics.That way they are stored in memory and we don't have to go back to the disk file every time we want to do something with the objects stored there. Copy Shapes.1.cpp from Assignment 2, Shapes v.1 to Shapes.2.cpp for this assignment. Do not use more than one source file -- that means no .h files, and just a single .cpp. (To use multiple files would needlessly complicate this solution.) With one exception, the console output should match that of the Assignment 1 version.Unlike Assignment 1,read all of the file data before producing any object output.Only after the input file is read and closed,produce output for the objects.Here is the exception: any invalid object names will appear at the TOP of the console output list,outputted in the loop that reads the input file and stores the valid objects in a bag.Invalid objects are NOT stored in the bag,nor included in the TXT output,as they as ignored in any further processing. ** To test your program,_you may use the same input text file,_Shapes.input.txt Program Changes 1.Modify the program so that it includes struct s for each of the eight shapes that were the subject of Assignment 1.Name these as follows: Square,Rectangle,Circle,Triangle,Cube,Box,Cylinder,and Prism.Include attributes of the double data type for the required dimensions for each (for example,length and width for the Rectangle).Provide a descriptive name for each of these data elements (for example,"radius"instead of "r").Do NOT include any other attributes,and do NOT include any"member functions"--avoid the temptation to extend the specifications beyond what is required. If you include attributes for area,volume,or perimeter,you are not doing this right! 2. Write supporting functions to do console output each shape (for example, void outputBox(ostream&, const Box&); ), which should output to either cout or fout --whichever is the first parameter in a call,using the same format as v.1.Note that cout is an object of type ostream.So use cout as the first parameter in the function call in order to produce console output.Use the exact same supporting functions for text file output, the ROUNDING Format-the calculated results to 2 digits after the decimal(out.setf(ios:fixed);out.precision(2):.But echo the input values without formatting.(out.unsetf(ios::fixed); out.precision(6);) 3.Use any type of array for your bag--C,C++,or STL vector--your choice.STL vectors track their or size,so if you use a C or C++ array instead you'll have to use an int to track size yourself 4.Write 4 loops --one to process the input file and fill the bag,one for console output,one for TxT output,and one for deallocation.If you don't have 4 loops,or if you do more than one of these things in any single loop,you're not doing this right! Submit Shapes.2.cpp for grading.

View Answer
divider
BEST MATCH

Suppose a factory that produces (x) electric ovens with a total cost function in the form: c(x) = 2x^2 + 4x + 450 a. Find the average cost function and the marginal cost function. b. Calculate the level of production (x) that minimizes the average cost function. What is the minimal average cost? c. Use marginal analysis to estimate the cost of manufacturing the 8^{th} unit. What is its actual cost? (6 marks)

View Answer
divider
BEST MATCH

If a gene produces a pre-RNA that is 1000 base pairs (bp) long and has the following intron-exon structure: • Exon 1 - 100 bp • Intron 1 - 100 bp • Exon 2 - 150 bp • Intron 2 - 150 bp • Exon 3 - 500 bp Disregarding alternative splicing, how many base pairs would you expect the mature mRNA to be? 350 750 1000 500 250

View Answer
divider
BEST MATCH

Q2 Figure 2.0(a) shows a complete C code to calculate the volume of cones with different radius, height and "Pi" as a defined constant. By referring to Figure 2.0(b) -program's "Outputs", kindly interpret the missing codes based on the below C codes. #include<stdio.h> int main() { int total; float height, radius; printf("\t\t\t***********Cone Volume Calculator***********"); printf("\n\n\nThis program is designed to calculate cone volume"); printf("\n\nPlease enter below data to determine the total cone volume:"); printf("\n\nPlease enter radius value (cm):"); scanf("%f",&radius); printf("\n\nPlease enter height value (cm):"); scanf("%f",&height); printf("\nResults:\n"); volumes total (0.333)*pi*radius*radius*height; printf("\n\nEnd of Program"); return 0; } Figure 2.0(b) **Cone Volume Calculator**...... This program is designed to calculate cone volume Please enter below data to determine the total cone volume: total cone to be calculated:2 Please enter radius value (cm):5.5 Please enter height value (cm):3.23 Results: the total volume of cone are: 204.46 cm^2 End of Program Process exited after 11.38 seconds with return value 0 Press any key to continue

View Answer
divider
BEST MATCH

Air enters the compressor of a gas turbine at 70°F and 0.8 psig and leaves the compressor at 300°F and 36 psig. It leaves the nozzle of the gas turbine at 650°F and 2.5 psig. With the atmospheric pressure of 14.7psi and nozzle exit area of 4 in²: Determine the following: a) Pressure ratio (2.5 points) b) Ideal efficiency (2.5 points) c) Thrust generated by the engine in lbr (10 points) d) Mach number (5 points)

View Answer
divider