Which will provide the program user some basic information

Assignment Help C/C++ Programming
Reference no: EM131556699

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).

Reference no: EM131556699

Questions Cloud

Create a simple java program that connects to database : create a simple Java program that connects to this database using JDBC. Your program should then query this database's "student" table.
How much larry should deposit each month : INVESTMENT ANALYSIS Since he was 22 years old, Ben has been depositing $200 at the end of each month into a taxfree retirement account earning interest.
Natural rate of unemployment : Potential GDP is $25 trillion; expectations are adaptive; the natural rate of unemployment is 5.5%; the 2010 inflation rate was 3.5%. The phillips curve is:
Warehouse management processes : Research at least 2 companies, and familiarize yourself with their warehouse management processes, and then discuss the following:
Which will provide the program user some basic information : DisplayApplicationInformation, which will provide the program user some basic information about the program.
Find size of monthly payments paul will be required to make : PERSONAL LOANS Two years ago, Paul borrowed $10,000 from his sister Gerri to start a business. Paul agreed to pay Gerri interest for the loan at the rate.
Discuss the technological changes : Using a Microsoft Word document, please assume you are a reporter writing ten years hence. Please discuss the technological changes.
How much cash can josh muster for his business : REFINANCING A HOME Josh purchased a condominium 5 yr ago for $180,000. He made a down payment of 20% and financed the balance with a 30-yr conventional.
Explain the impact if the attack or threat was actualized : Explain the impact if the attack or threat was actualized (happened). Would there be a monetary loss? Loss of confidence (in the event of a business breach).

Reviews

Write a Review

C/C++ Programming Questions & Answers

  What is the current size of q

Suppose an initially-empty queue Q has performed a total of 32 enqueue operations, 10 front operations, and 15 dequeue operations, 5 of which generated QueueEmptyExceptions, which were caught and ignored. What is the current size of Q?

  Read in two variables using a read function

Remember that the data variable names defined in main can be different from the data variable names used in the functions.

  Program to calculate a mortgage.

The user should be told what the invalid entry was and why it was invalid if they enter a zero or negative amount. They should then be prompted again to reenter a valid amount.

  How to compile your program

how to compile your program (including the actual compile command) and how to run it (including command line arguments, if any) A description of your solution to these two problems, including what you did to solve the problem, and why you did it that..

  C program that synchronizes a parent and a child process

Write a C program that synchronizes a parent and a child process in such a way that the output of the program will be:

  Show that regularity is preserved under the shift operation

Show that the regularity is preserved under the shift operation - I have the answer already but i do not understand

  Program that prints out any size triangle based on 2 inputs

My goal is to write a program that prints out any size triangle based on either one or two inputs (would prefer 2; e.g. range[a, e]). Each line of the triangle will be centered and looks like the attached output (equilateral triangle).

  Simulate a game of blackjack

Design and implement a C++ program to simulate a game of Blackjack between two to four players. Your program must incorporate a two-dimensional array to represent the suit and the value of each card dealt to a player

  Program in c to ask the user to input a set of characters

Write a program in C++ to ask the user to input a set of characters, one at a time separated by the carriage return (Enter). Each character, as well as, its corresponding ASCII value should be stored in a linked list node. This means that each nod..

  Conditional statementsquestion 1 write a program that

conditional statementsquestion 1 write a program that computes the cost of a long distance call. the cost of the call

  Features frequently used in web programming

In this assignment, you will experience some of the C# features frequently used in Web programming.  There isn't any client interaction in this assignment; rather, you statically construct some to-do item instances (you create a class named ToDoIt..

  Designing a marketing campaign for a small business

An employee is designing a marketing campaign for a small business. They show you the layout of the campaign that includes video downloaded from YouTube and Vimeo. Since this will be used for commercial purposes, what do you say to the employee?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd