Page 1 of 21 CS163 NetBeans Tutorial NetBeans is a free computer program (developed by Sun and currently owned by Oracle) that helps programmers create and manage computer programs, including programs written in C++ or Java. NetBeans is an example of an Integrated Development Environment (IDE), where the C++ program that you're developing is integrated (embedded) into a larger computer program (NetBeans) that includes many additional tools to help you organize, test, and repair any problems with your program. We'll be using NetBeans to develop our CS163 programs this semester. So to prepare for writing your own computer programs, you'll need to learn the basics of how to create and run a simple pre-written C++ program using NetBeans. NetBeans is a large and somewhat complicated-looking program because it has a lot of features that professional computer programmers can use. But fortunately we'll be able to ignore most of that complexity, because as beginners we only need to use a few of the features of NetBeans. So don't be intimidated by the way NetBeans looks at first. This tutorial will show you how to use NetBeans to enter, compile, and run a simple "Hello World" program written in C++. That C++ program (shown below) simply displays the phrase “Hello, world!” in a display window called the "console". For this tutorial, you don't need to understand all the details of the "Hello World" program. The main thing right now is to learn how to use NetBeans to do the basic things you'll need to do to create and save any computer program, including future programs that you will write. So in this tutorial, you will: Log into a CS lab computer, Start NetBeans, Enter the “Hello World” program that appears below into NetBeans, Save your “Hello World” program, Run the “Hello World” program, If necessary, fix any typographical errors in your program, re-save it, and re-run it until you get it working and your program displays the message “Hello, world!”. Print it (so you can turn it in for grading). Log out of the CS lab computer.
21
Embed
CS163 NetBeans Tutorial - University of Wisconsin–Eau Clairetan/priv/CS163 NetBeans Tutorial NetBeans is a free computer program (developed by Sun and currently owned by Oracle)
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1 of 21
CS163 NetBeans Tutorial
NetBeans is a free computer program (developed by Sun and currently owned by Oracle) that
helps programmers create and manage computer programs, including programs written in C++ or
Java. NetBeans is an example of an Integrated Development Environment (IDE), where the C++
program that you're developing is integrated (embedded) into a larger computer program
(NetBeans) that includes many additional tools to help you organize, test, and repair any
problems with your program.
We'll be using NetBeans to develop our CS163 programs this semester. So to prepare for writing
your own computer programs, you'll need to learn the basics of how to create and run a simple
pre-written C++ program using NetBeans.
NetBeans is a large and somewhat complicated-looking program because it has a lot of features
that professional computer programmers can use. But fortunately we'll be able to ignore most of
that complexity, because as beginners we only need to use a few of the features of NetBeans. So
don't be intimidated by the way NetBeans looks at first.
This tutorial will show you how to use NetBeans to enter, compile, and run a simple "Hello
World" program written in C++. That C++ program (shown below) simply displays the phrase
“Hello, world!” in a display window called the "console".
For this tutorial, you don't need to understand all the details of the "Hello World" program. The
main thing right now is to learn how to use NetBeans to do the basic things you'll need to
do to create and save any computer program, including future programs that you will write. So
in this tutorial, you will:
Log into a CS lab computer,
Start NetBeans,
Enter the “Hello World” program that appears below into NetBeans,
Save your “Hello World” program,
Run the “Hello World” program,
If necessary, fix any typographical errors in your program, re-save it, and re-run it until
you get it working and your program displays the message “Hello, world!”.
Print it (so you can turn it in for grading).
Log out of the CS lab computer.
Page 2 of 21
First, here is the "Hello World" program that you'll be entering and running. If you enter it
exactly as shown, it will run properly. Please note that at the end of the line that begins with the
word cout, the final letter before the semicolon is a lowercase letter L, not the number one.
/*
* File: main.cpp
* Author: [Put your name here]
* Program Name: Hello, World
* Course: CS163
* Created on [creation date here]
*/
#include <iostream.h>
int main() {
cout << “Hello, world!” << endl;
return (0);
}
Page 3 of 21
How to log into a CS Lab computer
1. Go to one of the Computer Science labs such as P115 (“The Dungeon”) or P107 (“The
Interrogation Room”) and sit down at any available computer.
2. The computer and monitor should already be turned on. If the screen is black, move the
mouse to wake up the computer and display the Windows log-on message, which says:
Press CTRL + ALT + DELETE to log on
Page 4 of 21
3. Do that, and log into Windows. Enter your email name as your user name. For example, if
your email address were [email protected], you would enter JONESJJJ as your user
name. Then enter your UWEC password.
4. You'll see the word “Welcome” for a while, then perhaps the message “Preparing your
Desktop”. It takes a while for Windows to “prepare your desktop”; please be patient.
If you come back and work at that same computer within the next three days, your desktop
remains prepared on that computer, so it will save you some time if you can get the same
computer each time. But after three days, your desktop becomes “unprepared” again and
you'll need to wait for it to be “prepared” again, no matter what computer you're using.
5. Finally you'll be presented with an empty blue Windows 7 desktop. So now it's time to start