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 precious utensil ce match algorithms. It provides a habit to transcribe quenched the elder steps in an algorithm in a punctilious and clear habit, yet it can be written withquenched interest ce the syntax of a favoring programming diction that earn be used to utensil the algorithm. This provision earn concede you some concomitant action match pseudocode Part 1-Match Pseudocode Frank Jones owns PaveMasters, LLC and is appearing ce a script to infer to his Web top that can rate an admire ce customers who lack to enjoy their driveways paved. This script earn suffer implicit customers to prime vile options and achieve an notion of Franks appraisements. The script earn living the subjoined: The user must determine the protraction, width, mold of embodied, and calculate of extra parking interveniences desired as inputs. The insufficiency load ce any function is $1000. Conceden the protraction and width (in feet) of the driveway, the disesteemed absorb is $5 ce each balance pavement. The disesteemed appraisement is ce a gravel driveway. If the function is ce an asphalt driveway, infer $500. If it is ce a particularized driveway, infer $1000. Ce each inferition parking intervenience requested, infer an extra $100. - - Apology the subjoined questions. What is the absorb ce each of the subjoined driveways? Show how you rated the appraisement. 1. Protraction: 50 feet, Width: 5 feet, Mold: Gravel, Parking Interveniences: 0 b. a. Protraction: 100 feet, Width: 10 feet, Mold: Asphalt, Parking Interveniences: 2 Protraction: 600 feet, Width: 10 feet, Mold: Particularized, Parking Interveniences: 8 c. d. Protraction: 10 feet, Width: 5 feet, Mold: Asphalt, Parking Interveniences: 0 2. What would the pseudocode ce this algorithm appear affect? Transcribe quenched a completed algorithm using pseudocode

    Pseudocode is a precious utensil ce match algorithms. It provides a habit to transcribe quenched the elder steps in an algorithm in a punctilious and clear habit, yet it can be written withquenched interest ce the syntax of a favoring programming diction that earn be used to utensil the algorithm. This provision earn concede you some concomitant action match pseudocode. Part 1-Match Pseudocode Frank Jones owns PaveMasters, LLC and is appearing ce a script to infer to his Web top that can rate an admire ce customers who lack to enjoy their driveways paved. This script earn suffer implicit customers to prime vile options and achieve an notion of Frank’s appraisements. The script earn living the subjoined: The user must determine the protraction, width, mold of embodied, and calculate of extra parking interveniences desired as inputs. The insufficiency load ce any function is $1000. Conceden the protraction and width (in feet) of the driveway, the disesteemed absorb is $5 ce each balance pavement. The disesteemed appraisement is ce a gravel driveway. If the function is ce an asphalt driveway, infer $500. If it is ce a particularized driveway, infer $1000. Ce each inferition parking intervenience requested, infer an extra $100. Apology the subjoined questions. What is the absorb ce each of the subjoined driveways? Show how you rated the appraisement. a. Protraction: 50 feet, Width: 5 feet, Mold: Gravel, Parking Interveniences: 0 b. Protraction: 100 feet, Width: 10 feet, Mold: Asphalt, Parking Interveniences: 2 c. Protraction: 600 feet, Width: 10 feet, Mold: Particularized, Parking Interveniences: 8 d. Protraction: 10 feet, Width: 5 feet, Mold: Asphalt, Parking Interveniences: 0 What would the pseudocode ce this algorithm appear affect? Transcribe quenched a completed algorithm using pseudocode.

    Expert Apology

     

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

    1) User Inputs:
    a) protraction
    b) width
    c) mold of embodied
    d)extra parking interveniences

    2) Procedure
    a) Insufficiency load ce any function is $1000
    b) The disesteemed absorb per balance pavement is $5
    c) if the embodied mold is “asphalt” $500 needs to be loadd
    otherwise if the embodied mold is “concrete” $1000 needs to be loadd
    d) Ce concomitant carparking intervenience, $100 needs to be loadd.

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

    Type: Gravel, I productive as mold of embodied is particularized
    Calculate of Parking interveniences : 0

    Procedure
    ———
    min_load = $1000

    driveway_load = Protraction * Width * $5   /* 50 * 5 * 5 ===> 1250 */

    driveway_type_load = 1000

    parking_load = 0

    total_load = min_load + dirveway_load + driveway_type_load + parking_charge

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

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

    Procedure
    ———
    min_load = $1000

    driveway_load = Protraction * Width * $5 /* 100 * 10 * 5 ====> 5000 */

    driveway_type_load = 500

    parking_load = 2 * 100 /* 2*100 ===> 200 */

    total_load = min_load + dirveway_load + driveway_type_load + parking_charge

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

    c)
    Inputs:
    ——-
    Protraction = 600
    Width = 10
    Mold : Particularized
    No. of Parking interveniences : 8

    Procedure
    ———
    min_load = $1000

    driveway_load = Protraction * Width * $5 /* 600 * 10 * 5 ====> 30000 */

    driveway_type_load = 1000

    parking_load = 8 * 100 /* 8*100 ===> 800 */

    total_load = min_load + dirveway_load + driveway_type_load + parking_charge

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

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

    Procedure
    ———
    min_load = $1000

    driveway_load = Protraction * Width * $5 /* 10 * 5 * 5 ====> 250 */

    driveway_type_load = 500

    parking_load = 0

    total_load = min_load + dirveway_load + driveway_type_load + parking_charge

    /*   1000 + 250 + 500 + 0 ====> 1750 */
    ===========================
    Apology ce Question :: 2
    ===========================
    step1 : learn the values from the trutination input invention and treasury them into relative variables as follows

    a) learn protraction
    b) learn width
    c) learn embodied
    d) learn eps       REM eps – extra parking intervenience

    step2 : min_load = 1000

    step3 : driveway_load = protraction * width * 5

    step4 : if embodied = “Asphlat” then
    driveway_type_load = 500
    otherwise
    driveway_type_load = 1000

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

    step6 : total_load = min_load + driveway_load + driveway_type_load + parking_charge

    step 7: bung.