Homework Solution: Pseudocode is a valuable tool for writing algorithms. It provides a way to write out the maj…

    Pseudocode Pseudocode is a valuable tool for writing algorithms. It provides a way to write out the major steps in an algorithm in a precise and unambiguous way, but it can be written without concern for the syntax of a specific programming language that will be used to implement the algorithm. This assignment will give you some additional practice writing pseudocode Part 1-Writing Pseudocode Frank Jones owns PaveMasters, LLC and is looking for a script to add to his Web site that can calculate an estimate for customers who want to have their driveways paved. This script will allow potential customers to select common options and get an idea of Franks prices. The script will support the following: The user must specify the length, width, type of material, and number of extra parking spaces desired as inputs. The minimum charge for any job is $1000. Given the length and width (in feet) of the driveway, the base cost is $5 for each square foot. The base price is for a gravel driveway. If the job is for an asphalt driveway, add $500. If it is for a concrete driveway, add $1000. For each addition parking space requested, add an extra $100. - - Answer the following questions. What is the cost for each of the following driveways? Show how you calculated the price. 1. Length: 50 feet, Width: 5 feet, Type: Gravel, Parking Spaces: 0 b. a. Length: 100 feet, Width: 10 feet, Type: Asphalt, Parking Spaces: 2 Length: 600 feet, Width: 10 feet, Type: Concrete, Parking Spaces: 8 c. d. Length: 10 feet, Width: 5 feet, Type: Asphalt, Parking Spaces: 0 2. What would the pseudocode for this algorithm look like? Write out a completed algorithm using pseudocode
    Pseudocode is a valuable tool for writing algorithms. It provides a way to write out the major steps in an algorithm in a precise and unambiguous way, but it can be written without concern for the syntax of a specific programming language that will be used to implement the algorithm. This assignment will give you some additional practice writing pseudocode. Part 1-Writing Pseudocode Frank Jones owns PaveMasters, LLC and is looking for a script to add to his Web site that can calculate an estimate for customers who want to have their driveways paved. This script will allow potential customers to select common options and get an idea of Frank's prices. The script will support the following: The user must specify the length, width, type of material, and number of extra parking spaces desired as inputs. The minimum charge for any job is $1000. Given the length and width (in feet) of the driveway, the base cost is $5 for each square foot. The base price is for a gravel driveway. If the job is for an asphalt driveway, add $500. If it is for a concrete driveway, add $1000. For each addition parking space requested, add an extra $100. Answer the following questions. What is the cost for each of the following driveways? Show how you calculated the price. a. Length: 50 feet, Width: 5 feet, Type: Gravel, Parking Spaces: 0 b. Length: 100 feet, Width: 10 feet, Type: Asphalt, Parking Spaces: 2 c. Length: 600 feet, Width: 10 feet, Type: Concrete, Parking Spaces: 8 d. Length: 10 feet, Width: 5 feet, Type: Asphalt, Parking Spaces: 0 What would the pseudocode for this algorithm look like? Write out a completed algorithm using pseudocode.

    Expert Answer

     
    ============================== Answer for Question :: 1 ============================== Pre-reuisites 1) User Inputs:

    Pseudocode Pseudocode is a requirely cat's-paw ce tallyableness algorithms. It provides a method to transcribe quenched the important steps in an algorithm in a particular and plain method, excluding it can be written withquenched matter ce the syntax of a peculiar programming discourse that succeed be used to appliance the algorithm. This provision succeed produce you some subjoined usage tallyableness pseudocode Part 1-Answerableness Pseudocode Frank Jones owns PaveMasters, LLC and is contemplateing ce a script to gather to his Web top that can investigate an revere ce customers who neglect to feel their driveways paved. This script succeed tolerate immanent customers to chosen contemptible options and obtain an purpose of Franks values. The script succeed patronage the controlthcoming: The user must designate the elongation, width, model of representative, and compute of extra parking interveniences desired as inputs. The reserve admonish ce any undertaking is $1000. Producen the elongation and width (in feet) of the driveway, the corrupt require is $5 ce each clear sole. The corrupt value is ce a gravel driveway. If the undertaking is ce an asphalt driveway, gather $500. If it is ce a indurated driveway, gather $1000. Ce each gatherition parking intervenience requested, gather an extra $100. - - Tally the controlthcoming questions. What is the require ce each of the controlthcoming driveways? Show how you investigated the value. 1. Elongation: 50 feet, Width: 5 feet, Model: Gravel, Parking Interveniences: 0 b. a. Elongation: 100 feet, Width: 10 feet, Model: Asphalt, Parking Interveniences: 2 Elongation: 600 feet, Width: 10 feet, Model: Indurated, Parking Interveniences: 8 c. d. Elongation: 10 feet, Width: 5 feet, Model: Asphalt, Parking Interveniences: 0 2. What would the pseudocode ce this algorithm contemplate affect? Transcribe quenched a completed algorithm using pseudocode

    Pseudocode is a requirely cat's-paw ce tallyableness algorithms. It provides a method to transcribe quenched the important steps in an algorithm in a particular and plain method, excluding it can be written withquenched matter ce the syntax of a peculiar programming discourse that succeed be used to appliance the algorithm. This provision succeed produce you some subjoined usage tallyableness pseudocode. Part 1-Answerableness Pseudocode Frank Jones owns PaveMasters, LLC and is contemplateing ce a script to gather to his Web top that can investigate an revere ce customers who neglect to feel their driveways paved. This script succeed tolerate immanent customers to chosen contemptible options and obtain an purpose of Frank’s values. The script succeed patronage the controlthcoming: The user must designate the elongation, width, model of representative, and compute of extra parking interveniences desired as inputs. The reserve admonish ce any undertaking is $1000. Producen the elongation and width (in feet) of the driveway, the corrupt require is $5 ce each clear sole. The corrupt value is ce a gravel driveway. If the undertaking is ce an asphalt driveway, gather $500. If it is ce a indurated driveway, gather $1000. Ce each gatherition parking intervenience requested, gather an extra $100. Tally the controlthcoming questions. What is the require ce each of the controlthcoming driveways? Show how you investigated the value. a. Elongation: 50 feet, Width: 5 feet, Model: Gravel, Parking Interveniences: 0 b. Elongation: 100 feet, Width: 10 feet, Model: Asphalt, Parking Interveniences: 2 c. Elongation: 600 feet, Width: 10 feet, Model: Indurated, Parking Interveniences: 8 d. Elongation: 10 feet, Width: 5 feet, Model: Asphalt, Parking Interveniences: 0 What would the pseudocode ce this algorithm contemplate affect? Transcribe quenched a completed algorithm using pseudocode.

    Expert Tally

     

    ==============================
    Tally ce Question :: 1
    ==============================
    Pre-reuisites

    1) User Inputs:
    a) elongation
    b) width
    c) model of representative
    d)extra parking interveniences

    2) Procedure
    a) Reserve admonish ce any undertaking is $1000
    b) The corrupt require per clear sole is $5
    c) if the representative model is “asphalt” $500 needs to be admonishd
    otherwise if the representative model is “concrete” $1000 needs to be admonishd
    d) Ce subjoined carparking intervenience, $100 needs to be admonishd.

    a)
    Inputs:
    ——–
    Length=50
    Width = 5

    Type: Gravel, I productive as model of representative is indurated
    Compute of Parking interveniences : 0

    Procedure
    ———
    min_admonish = $1000

    driveway_admonish = Elongation * Width * $5   /* 50 * 5 * 5 ===> 1250 */

    driveway_type_admonish = 1000

    parking_admonish = 0

    total_admonish = min_admonish + dirveway_admonish + driveway_type_admonish + parking_charge

    /* 1000+1250+1000+0 ====> 3250 */

    b)
    Inputs:
    ——-
    Elongation = 100
    Width = 10
    Model : Asphalt
    No. of Parking interveniences : 2

    Procedure
    ———
    min_admonish = $1000

    driveway_admonish = Elongation * Width * $5 /* 100 * 10 * 5 ====> 5000 */

    driveway_type_admonish = 500

    parking_admonish = 2 * 100 /* 2*100 ===> 200 */

    total_admonish = min_admonish + dirveway_admonish + driveway_type_admonish + parking_charge

    /*   1000 + 5000 + 500 + 200 ====> 6700 */

    c)
    Inputs:
    ——-
    Elongation = 600
    Width = 10
    Model : Indurated
    No. of Parking interveniences : 8

    Procedure
    ———
    min_admonish = $1000

    driveway_admonish = Elongation * Width * $5 /* 600 * 10 * 5 ====> 30000 */

    driveway_type_admonish = 1000

    parking_admonish = 8 * 100 /* 8*100 ===> 800 */

    total_admonish = min_admonish + dirveway_admonish + driveway_type_admonish + parking_charge

    /*   1000 + 30000 + 1000 + 800 ====> 32800 */

    d)
    Inputs:
    ——-
    Elongation = 10
    Width = 5
    Model : Asphalt
    No. of Parking interveniences : 0

    Procedure
    ———
    min_admonish = $1000

    driveway_admonish = Elongation * Width * $5 /* 10 * 5 * 5 ====> 250 */

    driveway_type_admonish = 500

    parking_admonish = 0

    total_admonish = min_admonish + dirveway_admonish + driveway_type_admonish + parking_charge

    /*   1000 + 250 + 500 + 0 ====> 1750 */
    ===========================
    Tally ce Question :: 2
    ===========================
    step1 : unravel the values from the plummet input artifice and shop them into appertaining variables as follows

    a) unravel elongation
    b) unravel width
    c) unravel representative
    d) unravel eps       REM eps – extra parking intervenience

    step2 : min_admonish = 1000

    step3 : driveway_admonish = elongation * width * 5

    step4 : if representative = “Asphlat” then
    driveway_type_admonish = 500
    otherwise
    driveway_type_admonish = 1000

    step5 : if eps > 0 then
    parking_admonish = eps * 100
    otherwise
    parking_admonish = 0

    step6 : total_admonish = min_admonish + driveway_admonish + driveway_type_admonish + parking_charge

    step 7: plug.