README.md 2.06 KB
Newer Older
cse's avatar
cse committed
1
# Decomposition and Conditionals Homework
Christopher Bohn's avatar
Christopher Bohn committed
2
3
4
5
6
7
8

**Collaboration Policy**: No collaboration is permitted on this assignment.

**Notes and References**: This is an open-book, open-note assignment.

## Overview

Christopher Bohn's avatar
Christopher Bohn committed
9
10
11
12
13
14
Proper problem and solution decomposition is an important software engineering
technique for writing readable and maintainable code. In this assignment you
will practice decomposition to solve two small computational problems whose
solutions may not be obvious from their descriptions. You will also practice
writing code that uses an enumerated type, string concatenation, and exception
handlers.
Christopher Bohn's avatar
Christopher Bohn committed
15
16
17
18
19

## Learning Goals

By completing this assignment, you should be able to:

Christopher Bohn's avatar
Christopher Bohn committed
20
1.  Decompose a solution to a problem into multiple methods in a Java program,
Christopher Bohn's avatar
Christopher Bohn committed
21

Christopher Bohn's avatar
Christopher Bohn committed
22
2.  Use an enumerated type to represent values from a limited space,
Christopher Bohn's avatar
Christopher Bohn committed
23

Christopher Bohn's avatar
Christopher Bohn committed
24
3.  Use string concatenation to format text output, and
Christopher Bohn's avatar
Christopher Bohn committed
25

Christopher Bohn's avatar
Christopher Bohn committed
26
4.  Use exception handlers to catch and handle input errors.
Christopher Bohn's avatar
Christopher Bohn committed
27
28
29
30
31
32
33
34
35

## Instructions

This assignment is to be completed individually; **no collaboration is
permitted**.

### Clone the Starter Code and Set Up Eclipse

1.  In your virtual machine, create a new folder in your `soft160-homework`
cse's avatar
cse committed
36
    folder named `homework5`.
Christopher Bohn's avatar
Christopher Bohn committed
37

cse's avatar
cse committed
38
2.  Change into the `homework5` directory.
Christopher Bohn's avatar
Christopher Bohn committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

3.  Clone
    [the starter code](https://git.unl.edu/soft-core/soft-160/decomposition-and-conditionals-homework).

4.  Change into the `decomposition-and-conditionals-homework` directory.  Verify that you are in
    the correct directory by running the command `pwd`.

5.  Remove the Git folder that links this code to the instructors' repository by
    running the command `chmod -R u+w .git` (which gives you permission to
    remove the folder without extra confirmation prompts) and then the command
    `rm -rI .git`.  Answer `yes` when asked to confirm the deletion.

6.  Verify the Git folder has been removed by running `ls -a` and making sure
    that you see folders with names like `src` and `documentation`, but that `.git`
    is **not** one of the items listed.

7.  Start the Eclipse IDE.

8.  Import the starter code into Eclipse as a Maven project.