D. Nixon: CS 12 > Week 10

Home (CS 12) | Assignments | Tutorials | Quizzes & Exam | Other Info

Computer Science 12


Week 10




Friday, November 4, 2011



Assignment 10 (due next week)

  1. Paper:
  2. Finish writing your paper. It should be six to eight pages long, double spaced, with a font size anywhere between 12 and 15. The final version of the paper must have a table of contents at the beginning, plus properly formatted footnotes (which will place themselves automatically at the bottom of the relavant page), citations, a bibliography, and at least three other sections whose titles will appear in the automatically generated table of contents at the beginning. The paper must be an original paper, not plagiarized. (Warning: BlackBoard includes the ability to search automatically for possible plagiarism.)

    The paper is due next week. The paper must have the following filename:

    where "last" and "first" should be replaced by your own last name and and first name, respectively.

  3. Access assignment:
  4. Following the instructions below, create a single-table database which will also have a form, a query, and a report.

    1. Creating a table in Access:
    2. Open Access. Click "Blank Database." By default, you will be shown a blank new table.

      First let's give the table an appropriate name. In the File menu, click "Save." In the "Save As" dialog box that pops up, change "Table1" to "Employees."

      Let's now create ("design") appropriate fields (columns) for this table. At the top of the main panel is a tab marked "Employees". Right click that tab and select "Design View." You'll now see a new table whose purpose is to define fields for the original table. To go back to the original table, click the "Employees" table again and select "Datasheet view." Then go back to "Design View" again, and toggle back and forth between the two views until you see how they relate to each other.

      Notice that one field has already been defined for us: A field named "ID," whose data type is "AutoNumber." Thi8s field will automatically generate unique ID's for all the employees in our table.

      In "Design View," let's now define the following additional fields:

      • A field named "Last name," of data type "Text"
      • A field named First name," also of data type "Text"
      • A field named "Date of birth," of data type "Date/Time"
      • A field named "Salary," of data type "Currency."

      For each field, type its name in the "Field Name" column of the "Design View" table, and select its data type from a drop down list.

      Then right-click the "Employees" tab at the top and select "Save." Then right-click the "Employees" tab again and select "Datasheet View."

      Now enter data for 10 employees. Make up their names, birth dates, and salaries. Note that the ID is automatically filled in for you. Choose birth dates such that about half the employees are over 30 years old and the other half are under 30. For both age ranges, choose salaries such that some are earning more than $50,000 (per year) and others are earning less than $50,000.

      Then right-click the "Employees" table and click "Save."

    3. Creating a form:
    4. Let's now create a form which will anable more data to be entered into the table in a more user-friendly fashion, one new employee at a time.

      At the top of the window, select "Create," Then click "form." At first, the form will display the data for your first employee. So that you can use it to enter data for new employees, click "New" at the top.

      The cursor will now be next to "(New)" in the ID field. Since that field is auto-generated, you can't put a value there yourself. So, just press Enter to move your cursor to "Last Name".

      Enter data for a few more employees.

      Then right-click the tab for the "Employees" table and select "Save". In the "Save As" dialog box, change the form's name to "Employee" (singular).

      Then click the "Employees" tab to bo back to the "Employees" table. At first, you won't see the new employees. Click "Refress All" a the top to make them appear.

    5. Creating a query:
    6. Let's now use our table to look up some information. Suppose we want a listing of all the employees over 30 years old who are earning at least $50,000. Given how short our table is, it's not too difficult to do this by hand. But, if we had a lot more employees, looking up this information by hand could be quite tedious. So, let's use a query to automate our search.

      At the top, click "Create," then select "Query Wizard." Select "simple query wizard" and click "OK."

      First, we are asked to select which fields will appear in our query result. Select all the fields. Then click "Next." Then select "Detail" and click "Next."

      In the next dialog bax, you are asked what name you want for the query, with default name "Emplyees query." Change the name to "Senior employees." Then select "Modify the Query Design" and click "Finish.".

      At the bottom, in the "Criteria" row, in the cell in the "Date of birth" column, enter "> " followed by a date 30 years ago. Also in the "Criteria" row, in the cell in the "Salary column, enter ">=" followed by the number 50000. (Do not use a dollar sign.)

      Then, at the top, click "Run" (with the red exlamation point icon). The quary results should then be generated. If you get an error message, see Examples of query criteria on the Microsoft site.

      Now save the query. Right click the "Senior employees" tab and click "Save."

    7. Creating a report:
    8. Let's now create a report to display our query results in a customizable fashion.

      At the top, click the "Create" tab, then select "Report." Then play around with various features to see how they change the appearance of your report.

      Then save your report.

    9. Saving your database:
    10. After you've saved all the individual objects in your database, save your database itself. In the "File" menu, select "Save Database As" and give your database a filename like the following:

      last-first-employees.accdb

      replacing "last" and "first" with your own last and first name.

  5. WinSCP/Unix assignment
  6. If you have not already done so, upload your HTML files to the Unix site for this course, as instructed in last week's tutorials on WinSCP. Make sure all your files are visible. (Among other things, you may need to change the permissions using the chmod command. Also, make sure all your links work.)

    Copy and paste the URL of your website into the "notes" area of the relevant page on Blackboard. (Do not submit a file.)


To all information for Week 10  |  To all homework assignments



Tutorials on Access 2010

Access 2010 tutorials:


To all information for Week 10  |  To all tutorials about Access



Tutorials on miscellaneous topics covered this week

Brief introduction to the Windows Command Prompt:

Logging on to a Unix system via WinSCP:

To upload a file via WinSCP, once you are logged in: (1) On the left side, navigate to the directory where your files are, on your local machine. (2) On the right side, go into the  public_html  directory, which is where you must put your files in order for them to be visible on your website. (3) On the left side, select the files you want to copy. After highlighting them, select "Copy" from the "Files" menu. (4) Click on the right side, then select "Paste" from the "Files" menu and respond appropriately to subsequent prompts. (5) Once you've uploaded all your files, view them at a URL like the following, to make sure you've uploaded them correctly:

http://cs12.cs.qc.cuny.edu/~yourusername/

replacing " yourusername " with your actual username. Be sure to include the tilde (" ~ ") just before your username.

Brief introduction to Unix:

In WinSCP, you can access the Unix command line (shell) by selecting "Open in PuTTY" from the "Commands" menu, once you are logged in to  cs12.cs.qc.cuny.edu .  (You will be prompted to log in again.) You do NOT need to do this in order to uploaded your files, which can be done easily via the GUI interface. Nevertheless, once you have successfully uploaded (and viewed) your files, you should take the opportunity to learn a little about the Unix command prompt.


To all information for Week 10  |  To all tutorials about miscellaneous topics



Study guide for next week's quiz

The November 11 quiz will be an on-paper quiz.

There will probably be a spreadsheet problem involving one or more of the previously-covered Excel functions, including VLOOKUP, LARGE, SMALL, PMT, FV, PV, SUM, COUNT, AVERAGE, MIN, MAX, the date functions (DATE, TODAY, DAYS360, and simple difference in days), and especially IF, AND, OR, COUNTIF, SUMIF, and AVERAGEIF. There may also be a problem involving the Goal Seek tool. There may also be various other fill-in-the-blanks questions about Excel features we have studied so far.

There will probably be some fill-in-the-blanks and/or multiple choice questions about WinSCP and Unix. Make sure you understand the material covered in class about permissions and the chmod command. Also there will be more questions about the same Unix commands mentioned in last week's quiz study guide: pwd, ls (including ls -l and ls -a) , cd, mkdir, and cp. Be familiar with the equivalent or near-equivalent command in the Windows Command Prompt. Make sure you know what a "directory" is, and what a "pathname" is.

There will probably be some fill-in-the-blanks and/or multiple choice questions about Wordpress blogs. Be familiar with the use of themes, and be familiar with the use of categories, tags, and links lists.

There will probably be some fill-in-the-blanks and/or multiple choice questions about databases and Microsoft Access.


To all information for Week 10  |  To all quiz and exam study guides

D. Nixon: CS 12 > Week 10