Writing preconditions and postconditions for defensive code and testing in Java
This series of videos is suitable for programmers with some programming or Java experience who want to learn object-oriented programming and dig deeper into some other Java features. This video uses examples from the textbook Java Java Java Object-Oriented Problem Solving by Morelli, Walde, and Hoffman, and the Proverb game to illustrate writing preconditions and postconditions and some strategies for writing defensive code. This video is suitable to watch after reading Chapters 0-6 of Java, Java, Java: Object-oriented problem solving, by Morelli, Walde. However, the video is very straightforward and can also stand alone or accompany any other textbook that has introduced structured programming and object-oriented programming in Java. Let's have some fun learning to program in Java!
Here's the video creating the Proverb game:
https://youtu.be/effodzPs6yE
You can practice adding defensive code to the Factorial program here*:
https://codecheck.io/files/22111714189u94s9cixffwu6whqhtpyryx1
The Proverb game classes are in my github repository, available here:
https://github.com/ProfessorBurke/JavaExamples/tree/main/SimpleJavaClass
The code from this video is in my github repository, available here:
https://github.com/ProfessorBurke/JavaExamples/tree/main/Exceptions
You can access the Java, Java, Java book here (assertions are in chapter 6, section 11):
https://runestone.academy/ns/books/published/javajavajava/book-1.html?mode=browsing
You can purchase the Effective Java book on Amazon**:
https://amzn.to/3glJFqv
If you want to earn credit for learning to code, take an online course at CCRI! These videos are part of the Advanced Java course:
https://ccri.edu/comp/
*The CodeCheck system courtesy of Cay Horstmann, https://horstmann.com/codecheck/
**As an Amazon Associate I earn from qualifying purchases. Your purchases help me continue to bring you content!
00:00 Flow of control
01:15 Preconditions and postconditions
05:16 Validating input to methods
07:02 State-checking methods
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Writing preconditions and postconditions for defensive code and testing in Java», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.