[Skip Navigation] [CSUSB] / [CNS] / [CSE] / [R J Botting] /[CS320 Course Materials] [Text Version] lab/03.html Wed Apr 11 10:14:48 PDT 2012
Labs: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]

Contents


    CSci320/lab/03 -- More HTML and a small bit of C++

      Goal

      1. Learn about lists in HTML.
      2. Review the compilation and editing of C++ programs.

      Deliverables

        By the end of the laboratory session I expect to see on your web site
        1. Your home page (index.html) now has an ordered list<ol>...</ol> for CS320 Lab work.
        2. The first list item<li> should have an anchor <a...>...</a> referring to a published C++ program.
        3. The published program should compile, run, and output a simple greeting.

      Process

      1. Start by downloading (shift click) this [ 04.cpp ] C++ program into one of your private directories.
      2. Have a look at it with the cat command:
         		cat 04.cpp
      3. Compile it using the g++ command:
         		g++ -o 04 04.cpp
      4. Run the output program (-o 04)
         		./04
      5. Edit the program so that it compiles, runs, and outputs a message:
         		vi 04.cpp
        Note: you have to think, to do this step.

      6. Once the program works, copy the source code (04.cpp) to your public directory:
         		cp 04.cpp ~/web
      7. Note: Never copy compiled C/C++ programs onto the web!

      8. Now you must add a list to your index.html page, that contains a list for laboratory work. Use vi or other editor to add this inside the <body>...</body> of your index.html page and after any </pre> tag:
         		<h3>My CS320 Lab Work
         		</h3>
          	<ol>
         		  <li>
         		<a href="http://cse.csusb.edu/public/your_group/your_identifier/04.cpp">A Simple C++ program</a>
         		</ol>
      9. Copy the index.html to your public space.
      10. Reload it and view it on the web.... and check the link.
      11. Call me over to earn credit.

      Grading

      Your score 0..10 will depend on how many of these steps you complete between the end of the lecture and the end of the laboratory.

    . . . . . . . . . ( end of section CSci320/lab/03 -- More HTML and a small bit of C++) <<Contents | End>>

    Check the next class

    [ ../04.html ]

End