Browse Source

converted to BlueJ

L. Dolio Durant 6 years ago
commit
f4ddf51972
9 changed files with 114 additions and 0 deletions
  1. 23
    0
      .gitignore
  2. 9
    0
      Human.java
  3. 3
    0
      HumanTest.java
  4. 11
    0
      InventoryManager.java
  5. 3
    0
      InventoryManagerTest.java
  6. 25
    0
      README.md
  7. 12
    0
      RotateList.java
  8. 3
    0
      RotateListTest.java
  9. 25
    0
      package.bluej

+ 23
- 0
.gitignore View File

1
+# ---> Java
2
+# Compiled class file
3
+*.class
4
+
5
+# Log file
6
+*.log
7
+
8
+# BlueJ files
9
+*.ctxt
10
+
11
+# Mobile Tools for Java (J2ME)
12
+.mtj.tmp/
13
+
14
+# Package Files #
15
+*.jar
16
+*.war
17
+*.ear
18
+*.zip
19
+*.tar.gz
20
+*.rar
21
+
22
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23
+hs_err_pid*

+ 9
- 0
Human.java View File

1
+
2
+/**
3
+ * Complete the 'Human' class in the Superpowers Package that has fields for: name, age, gender,
4
+ * occupation, and address. Also create methods for retreiving and outputing this data to screen.
5
+ * Then create a SuperHuman class and UNIT TEST that subclasses the first with fields for good or bad,
6
+ * hero name, super ability. As before, create methods for retrieving field data and printing to screen.
7
+ */
8
+public class Human {
9
+}

+ 3
- 0
HumanTest.java View File

1
+
2
+public class HumanTest {
3
+}

+ 11
- 0
InventoryManager.java View File

1
+
2
+/**
3
+ * Finish the InventoryManager Class in the InventoryManager Package,
4
+ * which manages an inventory of products. Create a product class which has a price,
5
+ * id, and quantity on hand. Then create an inventory class which keeps track of various
6
+ * products and can sum up the inventory value.
7
+ *
8
+ * Note: Inventory and InventoryManager should not be the same class!!!
9
+ */
10
+public class InventoryManager {
11
+}

+ 3
- 0
InventoryManagerTest.java View File

1
+
2
+public class InventoryManagerTest {
3
+}

+ 25
- 0
README.md View File

1
+# Humans and Superhumans
2
+
3
+### Objectives
4
+
5
+1. To demonstrate your understanding of objects and functions
6
+2. To demonstrate your understanding of controlling execution
7
+3. To demonstrate your understanding of access control
8
+4. To demonstrate your understanding of reusing classes
9
+
10
+
11
+### Overview
12
+
13
+Complete the 'Human' class that has fields for: name, age, gender, occupation, and address. Also create methods for retreiving and outputing this data to screen.
14
+
15
+Then create a SuperHuman class and UNIT TEST that subclasses the first with fields for good or bad, hero name, super ability. As before, create methods for retrieving field data and printing to screen.
16
+
17
+### Unit Test
18
+UML is required
19
+Unit test in  place before proceeding with code
20
+Make sure you test EVERY public method
21
+
22
+### Instructions
23
+
24
+1. In your unit test initialize a human and superhuman instances
25
+2. Demonstrate calling methods inherited from Human on your SuperHuman instances

+ 12
- 0
RotateList.java View File

1
+
2
+/**
3
+ * Finish the class RotateList make it subclasse the built-in List class. (Hint extends ?????)
4
+ * Write a function that rotates a list by k elements.
5
+ * For example [1,2,3,4,5,6] rotated by 2 becomes [3,4,5,6,1,2].
6
+ * The first 2 elements where rotated to the back of the List.
7
+ * If it was rotated by 3 [1,2,3,4,5,6] rotated becomes [4,5,6,1,2,3].
8
+ * Try solving this without creating a copy of the list.
9
+ * How many swap or move operations do you need?
10
+ */
11
+public class RotateList{
12
+}

+ 3
- 0
RotateListTest.java View File

1
+
2
+public class RotateListTest {
3
+}

+ 25
- 0
package.bluej View File

1
+#BlueJ package file
2
+editor.fx.0.height=722
3
+editor.fx.0.width=800
4
+editor.fx.0.x=560
5
+editor.fx.0.y=117
6
+objectbench.height=101
7
+objectbench.width=461
8
+package.divider.horizontal=0.6
9
+package.divider.vertical=0.8007380073800738
10
+package.editor.height=427
11
+package.editor.width=674
12
+package.editor.x=141
13
+package.editor.y=59
14
+package.frame.height=600
15
+package.frame.width=800
16
+package.numDependencies=0
17
+package.numTargets=0
18
+package.showExtends=true
19
+package.showUses=true
20
+project.charset=UTF-8
21
+readme.height=58
22
+readme.name=@README
23
+readme.width=47
24
+readme.x=10
25
+readme.y=10