Git Product home page Git Product logo

tc-objectorientedprograminglabs's Introduction

#Part 1 Rotate Array

###Objectives

  1. To demonstrate your understanding of objects and functions
  2. To demonstrate your understanding of controlling execution
  3. To demonstrate your understanding of access control
  4. To demonstrate your understanding of reusing classes

Overview

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

Unit Test

UML is required Unit test in place before proceeding with code Make sure you test EVERY public method

Instructions

  1. In your unit test class, initialize your custom List with values
  2. In your unit test class call the method that rotates your array

#Part 2 Humans and Superhumans

Objectives

  1. To demonstrate your understanding of objects and functions
  2. To demonstrate your understanding of controlling execution
  3. To demonstrate your understanding of access control
  4. To demonstrate your understanding of reusing classes

Overview

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.

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.

Unit Test

UML is required Unit test in place before proceeding with code Make sure you test EVERY public method

Instructions

  1. In your unit test initialize a human and superhuman instances
  2. Demonstrate calling methods inherited from Human on your SuperHuman instances

#Part 3 Class Manager

Product Inventory Project

Objectives

  1. To demonstrate your understanding of objects and functions
  2. To demonstrate your understanding of controlling execution
  3. To demonstrate your understanding of access control
  4. To demonstrate your understanding of reusing classes

Overview

Finish the InventoryManager Class in the InventoryManager Package, 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.

Note: Inventory and InventoryManager should not be the same class!!!

Unit Test

UML is required Unit test in place before proceeding with code

Instructions

  1. In your main class initialize your manager and populate your inventory
  2. Demonstrate calling methods on your manager

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.