Model Part 1Homepage  « Case Study « Model Part 1

In this section of the case study we look at the model part of the MVC paradigm and code as much of the model as we can from the information provided within the Project Proposal. The stakeholder Stocking Goods Limited have supplied us with a Stock interface that must be implemented and from this we can also derive some exception classes. In our first lesson of the section we code up the Stock interface and exceptions for our model code and compile them. The stakeholder has also requested that we create a class representing the record information within the Manufacturer file called unsurprisingly Manufacturer as they see a lot of future reuse of this file and it will also be helpful when implementing the Stock interface. The final thing we can do with the model at present is implement the Stock interface and create some method stubs we will come back to when we revisit the model code in the Model Part 2 section.

Stock Interface & Exceptions

The stakeholder Stocking Goods Limited have supplied us with a Stock interface that must be implemented and from this we can also derive some exception classes. In this lesson we code up these classes for our model code.

Manufacturer OO Request

The stakeholder Stocking Goods Limited have also requested that we create a class representing the record information within the Manufacturer file called unsuprisingly Manufacturer as they see a lot of future reuse of this file and it will also be helpful when implementing the Stock interface. In this lesson we create the Manufacturer class, wherein a Manufacturer object is a representation of the Manufacturer file in an object oriented framework, allowing easy access to fields.

Implementing the Stock Interface

In our final lesson of the section we implement the Stock interface using the StockImpl class and create some method stubs we will come back to, when we revisit the model code in the Model Part 2 section.

go to home page Homepage go to home page Top

All the Model Part 1 lessons are listed below. Click a link to go to that lesson.


Model Part 1

Stock Interface & Exceptions

Manufacturer OO Request

Implement Stock Interface