Skip to content

trixie88/oop-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oop-examples

OOP examples in Java

Extend existing code

Try to extend the examples in the following way.

package ex01

Users can now participate in a loyalty program, where they are allowed to collect points. For each 100 points, a user gains 1% discount on the price of a product. The maximum discount cannot be greater than 7%. Update existing source code to deal with this new requirement. Update the main method to demonstrate the new behavior.

package ex02

Revisit the main method in order to properly deal with possible exceptions.

package ex04

Update the DrawingMain method to print the aligned lines. Find and fix any bugs, if any.

Implement new code

Introduce package ex05

Create a new package ex05 that revisits the Drawing functionality to support Lines, Arrows and Shapes in a uniform manner. The new Drawing should allow users to both select and deselect its elements and also clean up the selection.

About

OOP examples in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%