SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 2 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Engineering Posted 14 Oct 2017 My Price 10.00

functions, arguments, parameters and returning values. Can you help? Thank you. Will tip a lot if correct.

Activity: Methods Before You Begin: Go thoroughly read the SDI_Methods.pdf! That PDF contains the full instructions for this project and the rubric, which explains how you will be graded. Criteria: For each problem below you will need the following: • Label the section of code appropriately. • Create a custom method for each of the (3) problems inside of (1) project. • Prompt the user for the required input in the main method. • Validate and convert each user prompt to insure that the user is typing in a valid response. • Send in the user’s input as arguments to the custom method. • The custom method should perform the task and save the result in a variable. • The result variable must be returned to the main method and caught by a variable. • Print out the result of each function to the console in the main method. • Use only code and techniques learned in this class. Graded Problems: Problem #1: Painting A Wall Calculate how many gallons it would take to paint a wall. This will • User Input (Ask & Validate In Main Method, Use As Arguments): o Width of wall (in feet) o Height of wall (in feet) o Number of coats of paint o Surface area one gallon of paint will cover (in feet2 ) • Return Value From Custom Function: o Number of gallons of paint needed • Result To Print To The Console In The Main Method: o “For X coats on that wall, you will need X gallons of paint.” • Data Sets To Test o Width – 8, Height – 10, Coats – 2, Surface Area - 300 ft2 § Results - “For 2 coats on that wall, you will need .53 gallons of paint.” o Width – 30, Height – 12.5, Coats – 3, Surface Area - 350 ft2 § Results - “For 3 coats on that wall, you will need 3.21 gallons of paint.” o Test one of your own. Problem #2: Stung! It takes 9 bee stings per pound to kill an animal. Calculate how many bee stings are needed to kill an animal in a function • User Input (Ask & Validate In Main Method, Use As Arguments): o Animal’s weight (in pounds) • Return Value From Custom Function: o Number of Bee stings • Result To Print To The Console In The Main Method: o “It takes X bee stings to kill this animal.” • Data Sets To Test o Animal’s Weight – 10 § Results - “It takes 90 bee stings to kill this animal.” o Animal’s Weight – 160 § Results - “It takes 1440 bee stings to kill this animal.” o Animal’s Weight – Twenty § Results – Re-prompt for number value. o Test one of your own. Problem #3: Reverse It 1. In your main method, declare and define an array of at least 5 strings elements. a. For this one problem, the array should be hard-coded and not from user prompted values. 2. Create a function that receives this array of strings. 3. Using a new array created in the custom method, create a loop to cycle through the array backwards and save the items in the reverse order to the new array. a. Remember this loop must work for an array of any size! b. You must reverse the array using a loop and NOT by just hard coding it! c. You may NOT use the Array.Reverse() method in this assignment. 4. Return this new reversed array to the main method. 5. Output both the original and reversed array in the main method. a. You may use a loop to output the arrays or you may convert them to a string and output that. § Parameter(s) for function: o Array of string elements § Return Value From Custom Function: o Array with string elements in reverse order. § Result to print to the console: o “Your original array was [X, X, X…] and now it is reversed as [X, X, X…]” § Data Sets To Test o Initial array – [“apple”, “pear”, “peach”, “coconut”, “kiwi”] § Results - Your original array was [“apple”, “pear”, “peach”, “coconut”, “kiwi”] and now it is reversed as [“kiwi”, “coconut”, “peach”, “pear”, “apple”] o Initial array – [“red”, “orange”, “yellow”, “green”, “blue”, ”indigo”, “violet”] § Results - Your original array was [“red”, “orange”, “yellow”, “green”, “blue”, ”indigo”, “violet”] and now it is reversed as [“violet”, “indigo”, “blue”, “green”, “yellow”, “orange”, “red”] o Now that you tested these 2 arrays, create one of your own to test and turn in.

Attachments:

Answers

(5)
Status NEW Posted 14 Oct 2017 01:10 PM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)