INF 231 Week 1 DQ 2 Running Applications

$15.00

INF 231 Week 1 DQ 2 Running Applications

Category:

Description

Install the application provided with the text. You should be installing Microsoft Visual C++ 2005. Depending on your operating system, you may need to download and run alternate software. XP users may need the following patch to get the Visual C++ software to run: Service Pack 1. Windows Vista and Windows 7 users are advised to download a similar opensource C++ program:DEV C++ by Bloodshed, instead of the software provided with the text.

You will also need to copy the zip file that provides the C++ libraries:Libraries.zip. Please read these Instructions on downloading the zip files to your hard drive.

As part of this exercise you will also use the sample code below to test the application, compile the code and communicate that your application was installed and working.

This is the sample code:

#include

#include

using namespace std;

int main()

{

string str1(“Alpha”);

string str2(“Beta”);

string str3(“Omega”);

string str4;

// assign a string

;

cout << str1 << "n" << str3 << "n"; // concatenate two strings + str2; cout << str4 << "n"; // concatenate a string with a C-string + ” to ” + str3; cout << str4 << "n"; // compare strings if(str3 > str1) cout << "str3 > str1n”;

if(str3 == str1+str2)

cout << "str3 == str1+str2n"; /* A string object can also be assigned a normal string. */ ; cout << str1; // create a string object using another string object string str5(str1); cout << str5; // input a string cout << "Enter a string: "; cin >> str5;

cout << str5; return 0; } The code above is a simple program that will output some string statements and then ask for one input and close after you enter text and then hit enter. Try to change the text once you are successful and rename your source file. Play around with the strings. Report your experience and your efforts to the discussion board. Respond to at least two of your classmates’ postings.

Reviews

There are no reviews yet.

Be the first to review “INF 231 Week 1 DQ 2 Running Applications”