Problem Set 8: Book Identifier

Web-CAT: Submit Java programs to this automated grading platform.

Task Outline

Background Theory

Calculating the Check Digit

x_{10} = (1 \cdot x_1 + 2 \cdot x_2 + 3 \cdot x_3 + 4 \cdot x_4 + 5 \cdot x_5 + 6 \cdot x_6 + 7 \cdot x_7 + 8 \cdot x_8 + 9 \cdot x_9)\, \mbox{modulus}\, 11

Example Case

(1 \cdot \texttt{0}) + (2 \cdot \texttt{7}) + (3 \cdot \texttt{8}) + (4 \cdot \texttt{9}) + (5 \cdot \texttt{7}) + (6 \cdot \texttt{5}) + (7 \cdot \texttt{1}) + (8 \cdot \texttt{9}) + (9 \cdot \texttt{8}) = 290

Hints

tenth = isbncode % 10
isbncode = isbncode // 10
ninth = isbncode % 10

Code Distribution

Description File Size File Name
Java Source Code for Book Identifier 4.9KB pset08.zip

Contents of pset08.zip:

PSet08BookIdentifier/
├── BookIdentifier.class
├── BookIdentifier.ctxt
├── BookIdentifier.java
├── BookIdentifierJUnitTest.class
├── BookIdentifierJUnitTest.ctxt
├── BookIdentifierJUnitTest.java
├── package.bluej
└── README.TXT

Specification

Testing

Submission