For this assignment, you will create a Visual Basic application that reports whether an input is odd, even or neither:
- odd: a number when divided by 2 that yields a remainder of -1 or 1.
- even: a number when divided by 2 that yields a remainder of 0.
- neither: a non-numeric input (such as ‘zero’) or a number when divided by 2 that yields a remainder other than -1, 0, 1.
The output should be reported using a MsgBox function. Click here to download the sample program.
- Create a new Windows Forms Application project and design a user-friendly interface, similar to–but not the same as–the one below.
- Remember to change the (Name) property of the form, labels, textboxes and buttons to an intuitive descriptor. For example, the name and text of Button1 should be changed to EvaluateButton and Evaluate, respectively.
- Re-read the scenario and conditions above. Think and plan before starting to code (i.e. write the pseudo-code).
- Code, test and debug. Use comments and create appropriately named variables to increase the readability of your code.
- Make sure all the conditions are met using the Evaluation rubric below as a checklist.
- When complete, package and submit the program.
Build the project (Debug → Build Project).Do NOT build the project since student accounts do not have full privileges to successfully build the application.
- Zip the entire folder along with its files and subfolders.
- Rename the zip file as OddOrEven.zip
- Upload OddOrEven.zip to the teacher via Google Drive.
Evaluation: 10 marks
- Objects are properly named. (2 marks)
- Program satisfies the four test cases. (8 marks)
- odd: any odd number including negative (e.g. -5, 11, 123).
- even: any even number including zero and negative (e.g. -12, 0, 4).
- neither: any decimal numbers (e.g. 0.1, 1.2).
- neither: any non-numeric input (e.g. ‘zero’, ‘apple’)
- Extremely large numbers (e.g. 1 trillion) will not be tested.