Engr 123 Spring 2018 Notes on Visual Studio

Similar documents
Click on the Start Icon. Click on All Programs

INFORMATICS LABORATORY WORK #2

Introduction. Key features and lab exercises to familiarize new users to the Visual environment

CSCI 161: Introduction to Programming I Lab 1b: Hello, World (Eclipse, Java)

Module 2: Content Development Organize Course Materials

Windows 2000 Safe Mode

Installing and Using Dev-C++

Getting Started with Visual Studio

How to set up an Amazon Work Profile for Windows 8

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2003

Installing and Using Xcode

Once file and folders are added to your Module Content area you will need to link to them using the Item tool.

Barchard Introduction to SPSS Marks

Lab1: Introductory and Setup Activities

Barchard Introduction to SPSS Marks

ECSE-323 Digital System Design. Lab #1 Using the Altera Quartus II Software Fall 2008

Com S 227 Assignment Submission HOWTO

Introduction to Computation and Problem Solving

Developing Intelligent Apps

Chat Activity. Moodle: Collaborative Activities & Blocks. Creating Chats

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2005

To complete this project, you will need the following folder:

EECE.2160: ECE Application Programming Spring 2018 Programming Assignment #1: A Simple C Program Due Monday, 1/29/18, 11:59:59 PM

1) Log on to the computer using your PU net ID and password.

Laboratory 1: Eclipse and Karel the Robot

Chapter 1 Getting Started

Guided Tour (Version 3.4) By Steven Castellucci

Guided Tour (Version 3.3) By Steven Castellucci as Modified by Brandon Haworth

I. Downloading Grades from the Grade Center

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2010

CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse

Windows Me Navigating

Setting up your Computer

Laboratory Assignment #3 Eclipse CDT

Instruction: Download and Install R and RStudio

MS Visual Studio.Net 2008 Tutorial

RegEx - Numbers matching. Below is a sample code to find the existence of integers within a string.

AP Computer Science A Summer Assignment

Click the +Assignments button. Depending on how you add your assignment, this step may look a little different. Enter your assignment information.

Linux Tutorial #1. Introduction. Login to a remote Linux machine. Using vim to create and edit C++ programs

CS 150 Lab 3 Arithmetic and the Debugger. Lab 3.0 We are going to begin using the Visual Studio 2017 debugger to aid with debugging programs.

Lab 1: Accessing the Linux Operating System Spring 2009

RegEx-validate IP address. Defined below is the pattern for checking an IP address with value: String Pattern Explanation

How to Archive s in Outlook 2007

Homework #1: SSH. Step 1: From the start button (lower left hand corner) type Secure. Then click on the Secure Shell File Transfer Client.

Arduino 02: Using the Arduino with Python. Jeffrey A. Meunier University of Connecticut

Cmpt 101 Lab 1 - Outline

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

WMI log collection using a non-admin domain user

Customizing Windows XP

Word 1 Module 2. Word 1. Module 2

Where Did My Files Go? How to find your files using Windows 10

Once you have installed MobaXterm, open MobaXterm. Go to Sessions -> New Session, and click on the SSH icon.

Lab - Working with ios

Tutorial 1: Unix Basics

IMPORTING A STUDENT LIST FROM SYNERGY INTO A GOOGLE CONTACT LIST

Tips from the experts: How to waste a lot of time on this assignment

Creating Interactive Video with Camtasia

Turnitin Bulk Download Instructions

Blackboard Learn: Basics

Epilog Laser Cutter Instructions (Only the Essentials)

5.5.3 Lab: Managing Administrative Settings and Snap-ins in Windows XP

FIT 100: Fluency with Information Technology

The QuickCalc BASIC User Interface

BLACKBOARD PORTFOLIOS

Conventions in this tutorial

BRIEFCASES & TASKS ZIMBRA. Briefcase can be used to share and manage documents. Documents can be shared, edited, and created using Briefcases.

Processing Big Data with Hadoop in Azure HDInsight

Scientific Visualization A Programming Guide using Fltk and Visual Studio

SDKs - Eclipse. SENG 403, Tutorial 2

This will be a paragraph about me. It might include my hobbies, where I grew up, etc.

Creating an Animated Sea Aquarium/Getting Acquainted with Power Point

Using Blackboard Drive to upload/manage content in Blackboard Learn

Chancellor s Office Information Technology Services Corporate Information Management FIRMS Budget Review Hyperion Process

First Visual Basic Lab Paycheck-V1.0

PANOPTO: WEB MANAGEMENT INTERFACE

Using Eclipse for Java. Using Eclipse for Java 1 / 1

Part 2 Uploading and Working with WebCT's File Manager and Student Management INDEX

To complete this activity, you will need the following files:

ECE2049 Embedded Computing in Engineering Design. Lab #0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

RTMS - Software Setup

Getting Started in the Online Lab

Creating a new CDC policy using the Database Administration Console

Blackboard Help Topic

Adrian College Blackboard Quick Start Guide for Instructors

Power BI Desktop Lab

SchoolDesk University

Faber 6000/Faber 6000 Plus USB Driver Installation for Windows 7/10

To complete this database, you will need the following file:

Virtual Desktop Infrastructure Setup for MacOS

Virtual Desktop Infrastructure Setup for MacOS

Registering for Microsoft ELMS for Imagine Software ( )

5.4.8 Optional Lab: Managing System Files with Built-in Utilities in Windows Vista

SenCom Jan. 11, 2013 Demonstration on Windows 7 Desktop, Windows Explorer & File Mgmt., and using Thumb/Flash Drives These topics by Mike Smith

Using the Zoo Workstations

General Guidelines: SAS Analyst

PowerPoint X. 1. The Project Gallery window with the PowerPoint presentation icon already selected. 2. Click on OK.

Code Check TM Software Requirements Specification

Instructions for MX350 Firmware Upload

Transcription:

Engr 123 Spring 2018 Notes on Visual Studio We will be using Microsoft Visual Studio 2017 for all of the programming assignments in this class. Visual Studio is available on the campus network. For your personal computer you can use Visual Studio Express for Windows Desktop which can be downloaded from http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx Download Visual Studio Community 2017 for Windows Desktop. These note explain how to create a new project using Visual Studio in C#, save it to a compressed zip folder, and submit it to the Engr 123 homework link. Setting up Visual Studio If you open Visual Studio for the first time it may ask you which environment you want to use. Choose the C# Language, although the General Environment is OK. Visual Studio then opens with the Start Page. Click on Tools Options Startup and set the start up so that it never downloads the news and opens to an empty environment as shown in Figure 1. Figure 1 Click on Tools Options Startup and set the start up to look like this. Click OK and then go to Tools Options Text Editor All Languages Tabs and set the options to look like that in Figure 2. The option which replaces tabs with spaces is critical to maintaining formatting for grading. Next click on Tools Options C# Formatting Indentation and choose the options shown in Figure 3. Finally, click on Tools Options C# Formatting New Line and select all of the options as shown in Figure 4.

Figure 2 Click on Tools Options Text Editor All Languages Tabs and select block indenting, tab and indent size of 2, and most importantly choose the option to replace tabs with spaces. Figure 3 Click on Tools Options C# Formatting Indentation. Set the options as shown.

Figure 4 Click on Tools Options C# Formatting New Line and choose all of the options. Don't forget to scroll down the options page. If you move to a new computer in the lab you will have to set up these options again otherwise, they need not be changed. Creating a New Project To create a new project click on File New Project as shown in Figure 5. This will lead to the new project window shown in Figure 6. Figure 5 Click on File New Project to create a new project. In Figure 6 the left most pane you can choose the language you want to use for your project. In Engr 123 everything will be in C# for windows. The center pane allows you to choose the type of project you are going to produce. For the first third of this class we will use a Console Application. At the bottom of the center pane we choose the project name and its location. For this project I have chosen Asn0 as the project name and I am saving it to C:\Courses\Engr123\C#2018\. As a student it is best if you save your project to either the

desktop or to a local thumb drive. Saving a project to your network drive may cause problems later when we do projects requiring file access. The Solution name will, by default be the same name as the project name. In the bottom right be sure to click the box that says Create directory for solution. Click OK to create the project. The project window will open as shown in Figure 7. Figure 6 The new project window. Figure 7 Project window for Asn0.

In Figure 7 there are three panes: Program.cs, Solution Explorer, Properties, and Error List. The Error List window may compressed at the bottom of your screen but you can use the cursor to pull it up. If the Solution Explorer or Properties or Error List windows are missing you can click on View and select those panes from the view menu. The Solutions Explorer is shown in Figure 8. This gives a list of all of the files that are associated with your project. The References section contains a list of mostly libraries that your program can use where each library contains a long list of functions. Most references are placed in this list automatically by Visual Studio but later we will learn to manually add references to a project. The line labeled Program.cs has a list of the program files in the project. We see that a Main program skeleton already exists. Figure 8 The Solutions Explorer pane. The Program.cs pane is a text editor where we can enter the program we are going to write. Visual Studio has already written the main program outline for us based on our choice of a Console type project. The Program.cs pane is in Figure 9. Figure 9 The Program.cs pane that has the main program.

The program that Visual Studio has written is complete and can be compiled and executed. To do this click on Debug Start without debugging. This will produce the console output window (which is black) with the message "Press any key to continue ". For Asn0 we will enter the program code on the following page. You can copy this entire page and paste it into the Program.cs pane to replace the skeleton program that Visual Studio created. Note that if you changed your project name to something other than Asn0, you will need to change the namespace in the code to match your project name. After you copy the source code from the following page into your project change the comments (in green ) at the top so that the source code has your name in place of the words "Your Name". Also replace the words "Today's Date" with the actual date. Click on Build Build Solution. At the very bottom of the screen you should see the words "build succeeded". If not, get your instructor to help you correct the errors. Click on Debug Start without debugging. This will run the program. A console window will appear with a prompt for a value for x. Enter 3.3 for the value for x and push Return on the keyboard. Your console window should say the following: Enter a value for x...3.3 y = 108.7584 Press any key to continue... Push any key to get back to Visual Studio. Exit Visual Studio by clicking on File Exit. In Windows click on the Start Button in the bottom left and click on Computer. Use the mouse to find the location of your Asn0 file. It will be a single folder named Asn0 at the location where you saved the project. Right click on the Asn0 folder and select Send to Compressed (zipped) Folder. This will create a new file named Asn0.zip. Rename this file Asn0XXX.zip where XXX is your three initials. Once you have the zipped file that contains the project and the design, upload it to \\cecsfp01\users\everyone\engr123. To do this click on the file explorer icon at the bottom left corner of the desktop. When the file explorer open you will see a screen whose top part looks like this: Type \\cecsfp01 where it says "This PC" and click on users everyone Engr123. Drag and drop your zipped folder to this location.

//Your Name //Assignment 0: First day //Today's Date // //This program prompts the user to enter a value for x. It calculates // and prints a value for y given by y = 3.2x^3 + 4x^2-16x + 3. // using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Asn0 {class Program {static void Main(string[] args) {double x, y; string stmp; Console.Write("Enter a value for x..."); //Prompt for a value of x stmp = Console.ReadLine(); //input is a string x = Convert.ToDouble(sTmp); //Convert input to double y = 3.2*Math.Pow(x, 3) + 4*x*x - 16*x + 3;//Calculate y Console.Write("y = "); //Print y's value Console.WriteLine(y); } } }