Write a class with multiple methods and a constructor Write instance variable (field) declarations Write accessor and mutator methods Use if statements and boolean conditions Write a JUnit test class Overview

education

Description

Write a class with multiple methods and a constructor Write instance variable (field) declarations Write accessor and mutator methods Use if statements and boolean conditions Write a JUnit test class Overview In this assignment, you will write another complete class that is intended to reinforce your basic skills in writing instance variables, getter methods, and setter methods, while also introducing the use of if statements to provide conditional logic, controlled by boolean conditions based on object state. You will also switch from writing "tester programs" that just print output to writing repeatable, automatically executable software tests for your work using the JUnit testing framework. 


The subject of this assignment is inspired by one of the programming exercises from Chapter 5 of the textbook, which is based on the textbook author's own minivan. If you drive a late model minivan with power doors, you might recognize some of these behaviors yourself. Your task is to simulate a portion of the control software for the vehicle. You will write a class that represents the state of the controls, providing accessor and mutator methods for the state of the relevant vehicle switches. You will also provide methods that represent door opening actions, and that implement logic matching the description provided below. 


Details The textbook author's minivan has two power sliding doors. Each door can be opened by either a dashboard switch, its inside handle, or its outside handle. However, the inside handles do not work if the minivan's child lock switch is activated. In order for the sliding doors to open, the gear shift must be in park, and the master unlock switch must be activated. You will write a class that represents these vehicle features, and models the process of deciding whether a sliding door will open or not. At the same time, you will also write software tests to confirm your solution works the way it should. Instead of writing a "tester" program that just prints out expected results, you will instead write your software tests using the JUnit testing framework, which makes it much easier to repeatedly run and recheck test results as you work. Complete document enclosed.


Related Questions in education category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.