Introducing the challenge
1. Introducing the challenge
Welcome to the course! I’m Mark Pedigo, your instructor for this exciting case study. With a PhD in mathematics and a wealth of experience in modeling and software development, I’ve worked across healthcare, government, and academic sectors for companies such as UnitedHealth Group, Ring, and NASA.2. What is a case study?
This isn't your typical course; it's an interactive case study designed to put your developer skills into action, tackling a real-world problem head-on.3. Case study scenario
Throughout this journey, you'll step into the shoes of a loan officer at PyBank Financial. Your mission? To determine how much a customer can afford when buying a new home, given their monthly income and loan term, and to calculate their monthly payments based on the loan amount, interest rate, and term. Disclaimer: Please note that the calculations in this course are for illustrative purposes only and are not intended as professional advice.4. Plan of action
How will you tackle these tasks? Your aim is automation - so you'll build software to streamline your work. By following software engineering best practices, you'll start with a basic calculator and expand it into financial and mortgage calculators. Each type of calculator will have its own class representation.5. Inheritance
You'll use inheritance to build these tools efficiently. First, you'll create a basic calculator class as the superclass or parent class for the other calculators. The basic calculator will implement several methods for, well, basic calculations. The financial calculator, a child class of the basic calculator, will inherit these functions while adding features such as calculating monthly interest rates. Similarly, the mortgage calculator, an extension of the financial calculator, will focus on specific mortgage calculations, such as estimating maximum loan amounts and monthly payments. This use of inheritance allows you to build the solution in stages.6. Review of software engineering principles
As your mortgage calculator will be used in a simulated production environment, adhering to best-practice software engineering principles is crucial. Object-oriented programming (OOP) and inheritance are at the heart of these principles. Let’s quickly revisit some of them. Writing modular, clean, and efficient code is key. This means breaking down the program into manageable parts, making it easier to read and maintain. For you, this involves developing methods and classes that are not only efficient but also reusable. Modifying and integrating pre-existing code is a common task. You'll need to understand and adapt existing code, ensuring seamless integration with any necessary packages. Documentation is a vital yet often overlooked element. Well-written guides, comments, and instructions are essential for collaboration and long-term maintenance. Given your managers' interest in the project, it's important to keep detailed records and document every step. Testing is non-negotiable. You'll use doctest for documentation-based testing and unit tests for individual components, ensuring that every part of your calculators works flawlessly.7. Roadmap
To help you stay on track, a project schema will guide you. It's easy to get lost in the details, so please use this diagram as your map to see the bigger picture, reassess your progress, and identify what remains. Green denotes topics you've finished, while yellow are issues in progress or immediately following, such as implementation of the `BasicCalculator` and `FinancialCalculator` classes using inheritance.8. Let's build!
Now, let's dive in and start building your BasicCalculator!Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.