You are required to write a program to continuously enter the following information until the user chooses to exit.
Ratings are 0 - very bad to 5 - very good.
After the data has been entered correctly, calculate the overall rating of the movie as follows.
Express the overall rating as a whole number out of 10 and write the rating as a series of '*' characters.
For example : See image.
This practical test requires you to develop an algorithm using pseudocode to define the steps required to solve the Task Description.
Use WordPad or another text editor to write your pseudocode.
Notes:
This practical test requires you to develop and submit the first part of the program as described in the Task Description.
Create a new C# console application project in Visual Studio and name the project pracTest2. Write the C# code to perform the following:
Notes :
Create a new C# console application project in Visual Studio and name the project pracTest3.
Program description: Develop a program that collects information about a movie and associated rating, calculates and outputs an overall rating as per the Task Description. You should collect and store the following information from the user:
Calculate the movie rating using the following:
Your program should display appropriate informative prompts, retrieve the data from the keyboard and store each entry to be used to display output or used to calculate the overall rating. You should output the results a follows: See image.
Express the overall rating as a whole number out of 10 and write the rating as a series of '*' characters.
Notes :
Create a new C# console application project in Visual Studio and name the project pracTest4.
Program description: Develop a program that collects information about a movie and associated rating as per the Task Description. You should collect and store the following information from the user:
Calculate the movie rating using the following:
Notes :
Your program should display appropriate informative prompts, retrieve the data from the keyboard and check the data is valid then store each entry to be used to display output or used to calculate the overall rating. Where an error is detected in the data entry process, display an appropriate message then exit the program. Error checking should include :
You should output the results a follows (Note in the example the results are formatted and aligned) : See image.
Express the overall rating as a whole number out of 10 and write the rating as a series of '*' characters. Ensure you place a comment at the top of the program that contains your full name and student number. Place comments in your code as required and ensure you layout your code appropriately.
Program description: Develop a program that continuously collects information about a movie and associated rating until the user decided to exit the program as per the Task Description. Using the solution provided for practical test 4 or your code, enhance and change the program to perform the following : Create a menu that contains the following options:
Display the menu and wait for the users response. Process the options entered until the user enters 'x' to quit. Using a switch statement organise the code to suit the option Option 'm' : Get movie details should do the following: Collect and store the following information from the user:
Option 'r' : Get movie ratings should do the following: Collect and store the ratings:
Option 'c' : Calculate overall rating and display (c) should do the following: Calculate the movie rating using the following:
Output the results a follows: See image.
Use a for loop to write the '*' character to the screen Option 'x' : Exit (x) should do the following: Exit the program
Notes :
Create a new C# console application project in Visual Studio and name the project ass1.
Program description: Develop a program that collects information about a maximum of 50 movies including their ratings. Provide functions to Add, Search, Display and Delete a movie and enable the user to calculate and display an overall movie rating to the ratings entered. The program should contain the following functionality: Store a maximum of 50 movie records containing the following:
Add a movie record : Prompt for the movie data and store the data entered into the next array position. Validate the following fields to ensure they are correct before storing the data:
Find a movie record : Prompt for the Movie Title of the movie to search.
Delete a movie : Delete the current active movie
Display the current movie Output the movie details a follows: See image.
Get, Calculate and display a overall movie rating : Display current active movie Prompt for the ratings data for the movie Calculate the overall movie rating using the following:
If the current movie has a previously calculated overall rating, use the new value to update the overall rating by adding the new value to the current value and dividing the value by 2.
EG:
Output the results a follows: See image.
Use a for loop to write the '*' character to the screen
Requirements:
You have two options in the way you declare and manage the data.
You must use functions in your code. Functions could include:
Other functions may be created as required. Data must be passed to the functions. Use a menu to control the program:
Notes :
Assignment 2 consists of 2 parts. Part A : worth 5%, requires you to include code within the movie program to write the array of movie data to a file called movies.txt and read the movies.txt into program if requested by the user. Part B : worth 5%, design a user interface that could be used to control the functions of the movie program.
Part A: Description
Create a new C# console application project in Visual Studio and name the project ass1-partA Using the solution provided to Assignment 1 or your solution for Assignment 1, include a two new options in the menu that perform the following: Save data to file (0) : when chosen, open a file called movies.txt and write the data for all movies entered to the file.
EG : See image.
Each movies data should be written to the file on a newline and all data is comma separated. Read data from file (0) : when chosen, open the file called movies.txt and read the following data for all movies contained within the file into the movie data arrays.
EG : See image.
Each movie data is read from the file one line at a time, split into the individual elements using the comma separator. NOTES : Ensure you use try catch statements to provide the following error checking to ensures the program does not crash.
Part B : Description
Create a new C# Windows Forms project in Visual Studio and name the project ass1_partB. Develop an interface that could be used to move the console movie program into a Windows Forms Program. You may use any type of control available and you may explore all types of layout. An example of your interface could be as follows: See image.
You do not have to incorporate any of the existing code into the Windows Forms application. It is just the interface and no actions or events are required. Place the relevant controls and labels on the form. Name each control with an appropriate property name. EG: The Movie Title TextBox could be called movieTitleTextBox You do not have to place default data in the control but you may if you wish.