fbpx

Running applications | Social Science homework help

Don't use plagiarized sources. Get Your Assignment on
Running applications | Social Science homework help
Just from $13/Page
Order Now

  

Ashford 2: – Week 1 – Discussion 2

 

Your initial discussion thread is due on Day 3 (Thursday) and you have until Day 7 (Monday) to respond to your classmates. Your grade will reflect both the quality of your initial post and the depth of your responses. Reference the Discussion Forum Grading Rubric for guidance on how your discussion will be evaluated.

 

     

Running   Applications

Install the application provided with the text. You should be installing Microsoft Visual C++ 2005 (Windows Vista users will also need to install Service Pack 1 before running the program).

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 <iostream>
#include <string>
using namespace std;

int main()
{
  string str1(“Alpha”);
  string str2(“Beta”);
  string str3(“Omega”);
  string str4;

 // assign a string
  str4 = str1;
  cout << str1 << “n” << str3 << “n”;

// concatenate two strings
  str4 = str1 + str2;
  cout << str4 << “n”;

// concatenate a string with a C-string
  str4 = str1 + ” 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. */
  str1 = “This is a null-terminated string.n”;
  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;

system(“pause”);
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.

Recent Blog Posts

No recent articles to show.

Other Blog Posts

What are the key elements of an essay

You may clearly understand what an essay is and have had the experience of writing a number. However, it is […]

Feb 25th, 2022

How to write a research paper fast

The day inevitably comes; you need to submit your assignment. You have been procrastinating on writing your paper until the […]

Feb 24th, 2022

220+ best humanities research paper topics

Choosing a paper topic can be a daunting task for any assignment. A student may face agony trying to come […]

Feb 24th, 2022

How to write a media analysis essay

The media is an integral part of modern society. Think of what would happen to the world if there were […]

Feb 23rd, 2022

Great tricks on how to write a hypothesis in 2022

A hypothesis is a statement that can be proven by scientific research. It proves the theory of action and reaction, […]

Feb 22nd, 2022

How to get better at math

Math is not difficult. However, it is complex and tough compared to other subjects and requires a little bit more […]

Feb 22nd, 2022