Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

Assignemnt: Lab, Design Program Description: Basic User Interface

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 type =George Cabral
2. Your age, which will be an integer data type =30
3. The gas mileage for your car, which will be a double data type =35,000
4. Display the collected information

Also, note that the program should contain a well document program header.

Pseudocode

//Program Header
//Program Name: Basic User Interface
//Programmer: George Cabral
//CIS247, Week 1 Lab
//Program Description: PROVIDE A DESCRIPTITON OF THE PROGRAM

Start main

//declare variables input as string name as string age as integer
mileage as double

callDisplayApplicationInformation
callDisplayDivider("Start Program")

callDisplayDivider("Get Name") set name = GetInput("Your Name")
display "Your name is: " + name

callDisplayDivider("Get Age") set input = GetInput("Your Age") set age = convert input to integer
display "Your age is: " + age

callDisplayDivider("Get Mileage") set input = GetInput("Gas Mileage") set mileage = convert input to double //display mileage to 2 decimal places
display "Your car MPG is: " + mileage

callTerminateApplication

end main program procedure DisplayApplicationInformation

display "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 procedure

procedureDisplayDivider(string outputTitle) display

+ outputTitle +

end procedure function GetInput(string inputType) as string
strInput as string

display "Enter the " + inputType get strInput

returnstrInput

end function procedure TerminateApplication

display "Thank you for using the Basic User Interface program" exit application

end procedure

1. Start Microsoft Visual Studio and create a new project titled "CIS247C_WK1_Lab_LASTNAME".
2. Using the design, construct the methods.
3. Once the methods are constructed, use the design to create the main program.

Capture the results of each test and paste them into a Word document. Below is a sample program output.

• Put all of the Visual Studio Project files into a zip file.
• Upload the zip file, test plan, and screenshots (Word document).

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M92365416
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in C/C++

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As