[Solved] : Week 1 Lab, Design Program Description: Basic User Interface

30 $

File Name: :_Week_1_Lab,_Design_Program_Description:_Basic_User_Interface.zip
File Size: 584.04 KB

SKU: [Solved] : Week 1 Lab, Design Program Description: Basic User Interface Category: Tag:

Or Upload Your Assignment Here:


This program creates the basic user interface code that can be used in the following week’s iLab assignments. The assignment will help you get started using the programming environment and some practice with coding. You will also be able to re-use much, if not all, of the code in later assignments.In this program, you will create the following methods:1. DisplayApplicationInformation, which will provide the program user some basic information about the program.2. DisplayDivider, which will provide a meaningful output separator between different sections of the program output.3. GetInput, which is a generalized function that will prompt the user for a specific type of information, then return the string representation of the user input.4. TerminateApplication, which provides a program termination message and then terminates the application.Using these methods, you will construct a program that prompts the user for the following:1. Your name, which will be a string data type2. Your age, which will be an integer data type3. The gas mileage for your car, which will be a double data type4. Display the collected informationAlso, note that the program should contain a well document program header.Pseudocode//Program Header//Program Name: Basic User Interface//Programmer: Your Name//CIS247, Week 1 Lab//Program Description: PROVIDE A DESCRIPTITON OF THE PROGRAMStart main//declare variablesinput as stringname as stringage as integermileage as doublecall DisplayApplicationInformationcall DisplayDivider(“Start Program”)call DisplayDivider(“Get Name”)set name = GetInput(“Your Name”)display “Your name is: “ + namecall DisplayDivider(“Get Age”)set input = GetInput(“Your Age”)set age = convert input to integerdisplay “Your age is: “ + agecall DisplayDivider(“Get Mileage”)set input = GetInput(“Gas Mileage”)set mileage = convert input to double//display mileage to 2 decimal placesdisplay “Your car MPG is: “ + mileagecall TerminateApplicationend main programprocedure DisplayApplicationInformationdisplay “Welcome the Basic User Interface Program”display “CIS247, Week 1 Lab”display “Name: YOUR NAME”display “This program accepts user input as a string, then makes the appropriate data conversion”end procedureprocedure DisplayDivider(string outputTitle)display “**************** “ + outputTitle + “****************”end procedurefunction GetInput(string inputType) as stringstrInput as stringdisplay “Enter the “ + inputTypeget strInputreturn strInputend functionprocedure TerminateApplicationdisplay “Thank you for using the Basic User Interface program”exit applicationend procedure

5/5 – (1 vote)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] : Week 1 Lab, Design Program Description: Basic User Interface
30 $