General Knowledge Lab

1 Introduction

In this course, a lab activity can be either a hands-on (when you create a couple of programs) or a theoretical one (when you need to answer questions about programming topics that are very important you to know).

This lab will be a theoretical lab since we have discuss lots of initial concepts about programming without really showing much how to program yet.

You can either print this document and answer the questions below on the printed copy, or you can write the questions in a sheet of paper and answer them there. This is not a test! However, the kind of questions herein can easily be part of your 1st exam, so be sure to discuss your answers with others classmates and the Lab-TA.You can look at any reference: my power point lectures, video lectures, and text book.

Take this opportunity to introduce yourself to a couple of classmates that are taking the lab with you and you have my permission to discuss your answers with them.

Do not write a “long poem” for each answer. At most 3 lines of text, please.

 

2 Questions 

a) Name three hardware items and three software items.

 

 

 

 

 

b) What is the main difference between languages such as C++ and Java in terms of delivering your program over the internet?

 

 

 

 

 

c) Explain how to create a Java program and how you run it using ALL the words below

Source code
extension .java
javac
java compiler
byte code
extension .class
java virtual machine
java
JVM
CPU
microprocessor

 

d) What is the cons and pros of an interpreted language like Java over some other compiled language such as C++?

 

 

 

 

e) what would be the commands that you need to type in a terminal window to compile a java source code and then later run it in your computer? Give an example using MyFirstProgram.java as the name of your program.