Software Design Specification
Das Auto Programming Quiz 01/17/14
Name:Computer Science:AMPM Date:
(Not Required, but you may fill-in-the-blanks and use this page as notes and documentation)
- Your name and date copyright notice as comments at the top of the VB.NET program
- Summary: Project Name – dasAuto
- Design and program a VB.NET Object-Oriented Project to keep track of and control a car’s direction and speed
- Save the project to your “Z:\vbNet_css##\” folder named dasAuto
- Definitions:
- Direction – the distance the car is pointing, in degrees 0 to 360, an Integer number
- 0 (or 360) both point due North, 90 is East, 180 is South, 270 is West
- Direction may be changed in increments of 15 degrees
- Speed – a measurement of velocity of travel in mph (miles per hour), an Integer number
- Speed is between 0 mph and infinity (in retrospect, this may not be a really good idea)
- Do not allow the car velocity to fall below 0
- Requirements:
- The initial direction is North (0 degrees)
- The initial speed is 0 (not moving)
- The user can control direction:
- The initial direction is due North (0 degrees)
- The user can turn right 45 degrees
- If, when turning right, the direction reaches 360, change it to 0
- The user can turn left 45 degrees
- If, when turning left, the direction reaches 0, change it to 360
- The user can control speed:
- The initial starting speed is 0 (not moving)
- To accelerate, increase speed by 10
- To decelerating, decrease speed by 10
- Do not allow the speed to fall below 0
- You MUST display current direction and speed to the user after each change
- Extras:
- How will you display direction and control?
- How will you allow the user to control direction and speed?
- What can you add to improve the program?
- How each requirement will be achieved:
- Program works, uses Object-Orientation, has one class, includes a way for the user to control direction and speed = 80 points (C)
- Nicely designed GUI = additional 10 points (B)
- Anything else = additional 10 points (A)
- Assumptions:
- The project MUST be Object-Oriented and have (at least) one class
- The project MUST have user controls to change direction and speed
- The class definition MUST:
- Have local attribute property variables
- Have a New() constructor behavior method routine
- Have “set” and “get” behavior method routines
- Standard languages and tools:
- VB.NET 2010 or 2008
- Wintel (Windows/Intel) based personal computer
- Definitions of variables and a description of where they are used:
- Class attribute property variable to hold direction
- Class attribute property variable to hold speed
- Logical structure and logical processing steps:
- User-generated event to Exit
- User-generated event to Turn Right
- User-generated event to Turn Left
- User-generated event to Accelerate
- User-generated event to Decelerate
- Performance: Sample Input:
Event / Direction / Speed
Start / 0 / 0
Accelerate / 0 / 10
Turn Right / 45 / 10
Accelerate / 45 / 20
Turn Left / 0 / 20
Decelerate / 0 / 10
Decelerate / 0 / 0
Decelerate / 0 / 0
- Reliability:
- Try any expected exceptions
- Catch any errors and display a useful (and clean) error message
- Questions and Answers: