Wednesday, May 6, 2020

Analysis Design and Testing

Question: 1. DesignPrior to commencing coding, you need to plan what youre going to code. Write an algorithm that describes how your program is going to work and how it links together.2. TestingExplain how you have tested your code and the results of your testing. This means writing down the inputs and actions which the marker should follow to reproduce the scenarios you used to check the program is working.Include screenshots demonstrating the results when you tested your code. Answers: Design: Analysis: Register a new movie: The cinema needs to store the movies title, rating, duration, synopsis, release date, billed cast, director, genre, distributor and official website. Schedule movie sessions: There is only one cinema screen, so only one movie can be shown at any time. Display the movie listing: This lists all movies. When a movie is selected, list all the details for that movie, including its future session times. Display all the session times for a selected day: These should be sorted from the earliest session time to the latest time, and identify which movie is screening at which time. Pseudo-code: Main() function Declare variables WHILE loop PRINT menu INPUT choice Switch case 1st case: Register new movie 2nd case: Schedule exist movie 3rd case: Display movie list 4th case: Display session for selected day 5th case: Exit from program Default case: PRINT Invalid choice END Switch case Main() function END Testing: Serial number Unit to be tested Criteria of success Method used for testing Testing results 1 Resister new movie Data will add in array Enter menu option 1. Enter movies title, rating, duration, synopsis, release date, billed cast, director, genre, distributor and official website. Pass 2 Schedule exist movie Session time and day movie will add in movie detail Enter menu option 2. Session time and day add in movie detail. pass 3 Display movie list All movie data display Enter menu option 3. Data display Pass 4 Display session for selected day All movie data for selected day will display Enter menu option 4. Selected data display. Pass 5 Exit from program Exit from program Enter menu option 5. Exit from program Pass Reference: https://www.tutorialspoint.com/java/ https://java.sun.com/docs/books/tutorial/ https://math.hws.edu/javanotes/

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.