Tariq Hook 7 年 前
コミット
831ca51bec

+ 102
- 0
.gitignore ファイルの表示

@@ -0,0 +1,102 @@
1
+.metadata
2
+bin/
3
+tmp/
4
+*.tmp
5
+*.bak
6
+*.swp
7
+*~.nib
8
+local.properties
9
+.settings/
10
+.loadpath
11
+.recommenders
12
+
13
+# External tool builders
14
+.externalToolBuilders/
15
+
16
+# Locally stored "Eclipse launch configurations"
17
+*.launch
18
+
19
+# PyDev specific (Python IDE for Eclipse)
20
+*.pydevproject
21
+
22
+# CDT-specific (C/C++ Development Tooling)
23
+.cproject
24
+
25
+# Java annotation processor (APT)
26
+.factorypath
27
+
28
+# PDT-specific (PHP Development Tools)
29
+.buildpath
30
+
31
+# sbteclipse plugin
32
+.target
33
+
34
+# Tern plugin
35
+.tern-project
36
+
37
+# TeXlipse plugin
38
+.texlipse
39
+
40
+# STS (Spring Tool Suite)
41
+.springBeans
42
+
43
+# Code Recommenders
44
+.recommenders/
45
+
46
+# Scala IDE specific (Scala & Java development for Eclipse)
47
+.cache-main
48
+.scala_dependencies
49
+.worksheet
50
+
51
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
52
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
53
+
54
+# User-specific stuff:
55
+.idea/**
56
+.idea/**/tasks.xml
57
+.idea/dictionaries
58
+
59
+# Sensitive or high-churn files:
60
+.idea/**/dataSources/
61
+.idea/**/dataSources.ids
62
+.idea/**/dataSources.xml
63
+.idea/**/dataSources.local.xml
64
+.idea/**/sqlDataSources.xml
65
+.idea/**/dynamic.xml
66
+.idea/**/uiDesigner.xml
67
+
68
+# Gradle:
69
+.idea/**/gradle.xml
70
+.idea/**/libraries
71
+.idea/*
72
+*.iml
73
+
74
+# CMake
75
+cmake-build-debug/
76
+
77
+# Mongo Explorer plugin:
78
+.idea/**/mongoSettings.xml
79
+
80
+## File-based project format:
81
+*.iws
82
+
83
+## Plugin-specific files:
84
+
85
+# IntelliJ
86
+/out/
87
+
88
+# mpeltonen/sbt-idea plugin
89
+.idea_modules/
90
+
91
+# JIRA plugin
92
+atlassian-ide-plugin.xml
93
+
94
+# Cursive Clojure plugin
95
+.idea/replstate.xml
96
+
97
+# Crashlytics plugin (for Android Studio and IntelliJ)
98
+com_crashlytics_export_strings.xml
99
+crashlytics.properties
100
+crashlytics-build.properties
101
+fabric.properties
102
+target/*

+ 114
- 0
README.md ファイルの表示

@@ -0,0 +1,114 @@
1
+#Part 1 Rotate Array
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
+ Finish the class RotateList in the RotateList package make it subclasse the built-in List class. (Hint extends ?????)
14
+ Write a function that rotates a list by k elements.
15
+ For example [1,2,3,4,5,6] rotated by 2 becomes [3,4,5,6,1,2].
16
+ The first 2 elements where rotated to the back of the List.
17
+ If it was rotated by 3 [1,2,3,4,5,6] rotated becomes [4,5,6,1,2,3].
18
+ Try solving this without creating a copy of the list.
19
+ How many swap or move operations do you need?
20
+
21
+## Unit Test
22
+UML is required
23
+Unit test in  place before proceeding with code
24
+Make sure you test EVERY public method
25
+
26
+## Instructions
27
+
28
+1. In your unit test class, initialize your custom List with values
29
+2. In your unit test class call the method that rotates your array
30
+
31
+#Part 2 Humans and Superhumans
32
+
33
+## Objectives
34
+
35
+1. To demonstrate your understanding of objects and functions
36
+2. To demonstrate your understanding of controlling execution
37
+3. To demonstrate your understanding of access control
38
+4. To demonstrate your understanding of reusing classes
39
+
40
+
41
+## Overview
42
+
43
+Complete the 'Human' class in the Superpowers Package that has fields for: name, age, gender, occupation, and address. Also create methods for retreiving and outputing this data to screen.
44
+
45
+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.
46
+
47
+## Unit Test
48
+UML is required
49
+Unit test in  place before proceeding with code
50
+Make sure you test EVERY public method
51
+
52
+## Instructions
53
+
54
+1. In your unit test initialize a human and superhuman instances
55
+2. Demonstrate calling methods inherited from Human on your SuperHuman instances
56
+
57
+#Part 3 Class Manager
58
+
59
+## Product Inventory Project 
60
+
61
+## Objectives
62
+
63
+1. To demonstrate your understanding of objects and functions
64
+2. To demonstrate your understanding of controlling execution
65
+3. To demonstrate your understanding of access control
66
+4. To demonstrate your understanding of reusing classes
67
+
68
+
69
+## Overview
70
+
71
+Create an application which manages an inventory of products. Create a product class which has a price, id, and quantity on hand. Then create an inventory class which keeps track of various products and can sum up the inventory value.
72
+
73
+## Unit Test
74
+
75
+UML is required
76
+Unit test in  place before proceeding with code
77
+
78
+## Instructions
79
+
80
+1. In your main class initialize your manager and populate your inventory
81
+2. Demonstrate calling methods on your manager
82
+3. Print all output to screen
83
+
84
+#Part 4
85
+# Class Manager
86
+
87
+## Product Inventory Project 
88
+
89
+## Objectives
90
+
91
+1. To demonstrate your understanding of objects and functions
92
+2. To demonstrate your understanding of controlling execution
93
+3. To demonstrate your understanding of access control
94
+4. To demonstrate your understanding of reusing classes
95
+
96
+
97
+## Overview
98
+
99
+Finish the InventoryManager Class in the InventoryManager Package, 
100
+which manages an inventory of products. Create a product class which has a price, 
101
+id, and quantity on hand. Then create an inventory class which keeps track of various 
102
+products and can sum up the inventory value.
103
+
104
+Note: Inventory and InventoryManager should not be the same class!!! 
105
+
106
+## Unit Test
107
+
108
+UML is required
109
+Unit test in  place before proceeding with code
110
+
111
+## Instructions
112
+
113
+1. In your main class initialize your manager and populate your inventory
114
+2. Demonstrate calling methods on your manager

+ 22
- 0
pom.xml ファイルの表示

@@ -0,0 +1,22 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <modelVersion>4.0.0</modelVersion>
6
+
7
+    <groupId>io.zipcoder</groupId>
8
+    <artifactId>ObjectOrientedProgramingLabs</artifactId>
9
+    <version>1.0-SNAPSHOT</version>
10
+    <properties>
11
+        <maven.compiler.source>1.8</maven.compiler.source>
12
+        <maven.compiler.target>1.8</maven.compiler.target>
13
+    </properties>
14
+    <dependencies>
15
+        <dependency>
16
+            <groupId>junit</groupId>
17
+            <artifactId>junit</artifactId>
18
+            <version>4.12</version>
19
+            <scope>test</scope>
20
+        </dependency>
21
+    </dependencies>
22
+</project>

+ 12
- 0
src/main/java/InventoryManager/InventoryManager.java ファイルの表示

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

+ 14
- 0
src/main/java/RotateList/RotateList.java ファイルの表示

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

+ 10
- 0
src/main/java/Superpowers/Human.java ファイルの表示

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

+ 5
- 0
src/test/java/InventoryManager/InventoryManagerTest.java ファイルの表示

@@ -0,0 +1,5 @@
1
+package InventoryManager;
2
+
3
+
4
+public class InventoryManagerTest {
5
+}

+ 5
- 0
src/test/java/RotateList/RotateListTest.java ファイルの表示

@@ -0,0 +1,5 @@
1
+package RotateList;
2
+
3
+
4
+public class RotateListTest {
5
+}

+ 5
- 0
src/test/java/Superpowers/HumanTest.java ファイルの表示

@@ -0,0 +1,5 @@
1
+package Superpowers;
2
+
3
+
4
+public class HumanTest {
5
+}