CS148-Car-Configuration-Application

Background

You should review following questions, to make sure you understand the outcomes from Unit 1. You should document lessons learnt for submission (with final unit of Car Configuration Application). You do not submit these questions for grading:

  1. What is the relationship between containment and encapsulation (as applied in this project), when building components?
  2. What are some ways to analyze data (presented in requirements) to design Objects?
  3. What strategies can be used to design core classes, for future requirements, so that they are reusable, extensible and easily modifiable?
  4. What are good conventions for making a Java class readable?
  5. What are the advantages and disadvantages of reading data from sources such as text files or databases in a single pass and not use intermediary buffering?
  6. What is the advantage of using Serialization? What issues can occur, when using Serialization with Inner classes?
  7. Where can following object relationships be used: encapsulation, association, containment, inheritance and polymorphism?
  8. How can you design objects, which are self-contained and independent?

Requirements

Part A
In this request, you will continue to build the application, for configuring the car:
I would like you to expand your proof of concept, by building API’s for car configuration classes, using interfaces and abstract classes. You will also add a custom exception handler, to enhance your design.
For expanding proof of concept, please consider the following requirements:

  • Define a set of methods in an interface (as API), to exercise the functionality of the existing class set.
  • Create an exception handler, which handles at least 5 exceptions.
  • Enhance your design and code to create any abstract classes for extensibility and reusability.

Deliverable

Design and code classes for above requirements and write a driver program, to exercise API and test the exception handler. Test your code adequately.
Concepts you will need to know:

  • Object Theory
  • Exception Handling
  • Abstract Classes
  • Interfaces

Your Exception class at a minimum should handle and fix at least one exception.
AutoException should have following features:

  1. Ability to track error no and error message.
  2. Contain an enumeration of all possible error numbers and messages, which can be used, when AutoException is instantiated.
  3. Ability to log AutoException with timestamps into a log file (you do not need to implement any complex logging mechanism).
  4. Write helper classes to delegate fixes for each method. For example, if exception number 1 to 100 is assigned to model package, you might author a class called Fix1to100 as a helper class for AutoException, which contains fix methods for exceptions raised in the model package.
  5. AutoException should have following implementation of fix method, which can be used for fixing any exception in entire application.
  6. Next, make the fix method accessible through FixAuto interface.