Instructions

Instructions

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 2

DownloadInstructions
Open PDF In BrowserView PDF
CSCI-C212/A592 – Intro to Software Systems
Spring 2017

Assignment 3
Due by 2/24/2017, Friday midnight through Canvas

Instructions:
•

•

Review the requirements given below and complete all three parts from below. Please
submit all files through Canvas.
The grading scheme is provided on Canvas. Be sure that your code includes everything
required in the grading rubric.

Part 1: Tic-Tac-Toe

Write a program that plsys tic-tac-toe. The tic-tac-toe game is played on a 3x3 grid as in
the image shown below.
The game is played by two players, who take turns. The first player marks moves with a
circle, and the second with a cross. The player who has formed a horizontal, vertical or
diagonal sequence of three marks wins. Your program should draw the game board, ask
the user for the coordinates of the next mark, change the player after every successful
move, and pronounce the winner.

Part 2:

For faster sorting of letters, the United States Postal Service (USPS) encourages
companies that send large volumes of mail to use a bar code denoting the ZIP code (see
image).

The encoding scheme for a five-digit ZIP code is shown
below. There are full-height frame bars on each side. The
five encoded digits are followed by a check digit, which is
computed as follows:
Add up all digits, and choose the check digit to make the
sum a multiple of 10. For example, the sum of the digits in
the ZIP code 95014 is 19, so the check digit is 1 to make
the sum equal to 20.
Each digit of the ZIP code, and the check digit, is encoded
according to the table at right, where 0 denotes a half bar
and 1 a full bar. Note that they represent all combinations
of two full and three half bars. The digit can be computed
easily from the bar code using the column weights 7, 4, 2, 1, 0. For example, 01100 is
0⋅7+1⋅4+1⋅2+0⋅1+0⋅0=6
The only exception is 0, which would yield 11 according to the weight formula.
Write a program that asks the user for a ZIP code and prints the bar code. Use : for half
bars, | for full bars. For example, 95014 becomes
||:|:::|:|:||::::::||:|::|:::|||
(Alternatively, write a graphical application that draws real bars.)
Your program should also be able to carry out the opposite conversion: Translate bars
into their ZIP code, reporting any errors in the input format or a mismatch of the digits.

Part 3:

There are three files provided on Canvas for debugging purposes. Those are named:
• LowerCaseString.java,
• Student.java,
• Word.java.

Fix all errors and ensure that the programs work as described in comments above the
code. Submit the corrected files on Canvas with comments identifying what was the
error/bug



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : Yes
Author                          : AABHUTTA
Comments                        : 
Company                         : 
Create Date                     : 2017:02:15 11:12:21-05:00
Modify Date                     : 2017:02:15 11:12:22-05:00
Source Modified                 : D:20170215161214
Subject                         : 
Language                        : EN-US
Tagged PDF                      : Yes
XMP Toolkit                     : Adobe XMP Core 5.6-c015 84.159810, 2016/09/10-02:41:30
Metadata Date                   : 2017:02:15 11:12:22-05:00
Creator Tool                    : Acrobat PDFMaker 15 for Word
Document ID                     : uuid:fb37ef63-b58a-4354-8f33-f590765d0c67
Instance ID                     : uuid:7bf114e0-cf4a-4176-9304-aadfa0bdb72c
Format                          : application/pdf
Title                           : 
Description                     : 
Creator                         : AABHUTTA
Producer                        : Adobe PDF Library 15.0
Keywords                        : 
Page Layout                     : OneColumn
Page Count                      : 2
EXIF Metadata provided by EXIF.tools

Navigation menu