easy it question 2

secretbankacc
easYitquestion2.docx

Goal

To introduce students to computer programming in both an object-oriented and a procedural programming language.

Directions

This laboratory assignment will utilize an Integrated Development Environment (IDE) from  this IDE website (Links to an external site.)Links to an external site.

Wikipedia states the following about an IDE (Links to an external site.)Links to an external site. : “An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools, and a debugger. Most modern IDEs have intelligent code completion. Some IDEs, such as NetBeans and Eclipse, contain a compiler, interpreter, or both; others, such as SharpDevelop and Lazarus, do not. The boundary between an integrated development environment and other parts of the broader software development environment is not well-defined. Sometimes a version control system, or various tools to simplify the construction of a Graphical User Interface (GUI), are integrated. Many modern IDEs also have a class browser, an object browser, and a class hierarchy diagram, for use in object-oriented software development.”

You must bring up the website using the link above to access the IDE. You will then type in each of the lab assignment’s program code. You can choose the programming language from the IDE’s menu. In this assignment you will be using both C and C++. The first two programs require that you only type in a given program’s code body (into the area on the website page where it says “code”), you will save a screen shot of the website with the typed-in code. Then you will execute (run) the code (button to run is at the bottom of the page) to get an output (shown in an output window at the bottom of the website page). You will also save a screen shot of the output. The remaining 2 will require you to copy and paste the entire program into the IDE thereby erasing whatever is there already. This process of inputting the program, saving a screenshot, running the program, and saving a screenshot of the output will be done for each one of the last 2 also. Each of these 8 total screenshots will then be pasted in an MS Word Document along with the answer to the interpretation question and turned in on Canvas before the deadline for submission.

C language program body (code that goes where “code” is on the IDE) that outputs “Hello World”:     printf("Hello World"); C++ language program body that outputs “Hello World”: std::cout << "Hello World" << std::endl;

C language program that adds two numbers (you will need to put two numbers in the input window and on separate lines to make it easy to document with the screenshot before you run):

#include<stdio.h> int main() { int a, b, sum; printf("\nEnter two no: "); scanf("%d %d", &a, &b); sum = a + b; printf("Sum : %d", sum); return(0); }                         

C ++ language program that adds two numbers (you will have to have the two numbers inputted as above):

#include <iostream> using namespace std; int main() {     int firstNumber, secondNumber, sumOfTwoNumbers;     cout << "Enter two integers: ";     cin >> firstNumber >> secondNumber;     // sum of two numbers in stored in variable sumOfTwoNumbers     sumOfTwoNumbers = firstNumber + secondNumber;     // Prints sum     cout << firstNumber << " + " <<  secondNumber << " = " << sumOfTwoNumbers;         return 0; }

Research online and in the textbook the primary differences between C and C++.

Interpretation Question (answer in a paragraph): Compare and contrast both C and C++.