Course Project DeVry University College of Engineering and Information Sciences Course Number: CEIS209 Background This course project is designed to help you practice using your skills. Each week, you...

1 answer below »
file attached


Course Project DeVry University College of Engineering and Information Sciences Course Number: CEIS209 Background This course project is designed to help you practice using your skills. Each week, you will learn important concepts. Then, you will apply these concepts to build an amazing course project over the next seven weeks. What’s more, this project will have a Graphical User Interface (GUI) instead of using the console. This course project has two parts. For the first couple of weeks, you will be create a basic GUI and learn how to work with GUI controls while practicing basic programming concepts. After that, you will create an object oriented project. Part 1: Scenario Lucky you! Your manager has put you in charge of the lyrics videos for the monthly lip synch contest. Each contestant “sings” along with a song of their choice, prompted by the lyrics in the video. Essentially, there is a long list of songs, along with associated URLs and other information. Your manager has some basic functionality in mind, such as the ability to add and remove songs, as well as create playlists and show the videos. The application must run fast, and be updated with new features over time. Maintenance is key! NOTE: For this project, we strongly suggest keeping a Notepad or MS Word document handy, containing the names of a few songs and associated video URLs. Week 4: Using arrays to store song data Objectives 1. Create individual one-dimensional arrays for each feature of a song 2. Edit the “Find Song” capability to display all of the data associated with a song. 3. Allow the user to click on an item in the song list ListBox, and display the array information for the selected item. Introduction Currently, when you enter a new song, you lose the associated artist, genre, and other data because you are not storing it anywhere. This can be resolved with arrays. This week you will create an array for the title, another for the artist, etc. As you know, when you declare an array, you need to know how many items will be in the array. “In real life” you would most likely use Lists instead, but that is a topic for later. For the purposes of this project, set a maximum array size of five songs. Steps 1. Declare arrays of titles, artists, genres, years, and URLs. These will all be arrays of strings, with the exception of the year (integer). Because you want these arrays to be used by all of the methods in the form, they should be declared inside the partial class mainForm : Form area. Here is an example of two of the arrays, each with five elements in them (i.e., five songs). You will need to add arrays for genre, year, and url as well. All arrays are strings except year which will be an int: int[] yearArray = new int[5]; Directly below the array initialization, include a song count variable as a counter. : int songCount=0; 2. Edit the AddButton_Click event handler to: a. Increment the songCount counter (which you declared and initialized to 0 just under the declarations for the arrays) when a song is successfully added. b. Insert the new song data at the array positions indicated by the songCount. Remember, C# arrays indices start at 0, not 1! c. Make sure, BEFORE you try adding anything to an array, that your songCount is not higher than the number of spaces in the array! If it is, then pop up a Messagebox stating that the user has reached their five-song limit. d. NOTE: the text in textboxes is immutable, which means that you have to store it in a variable before you can perform other operations. 3. Write a method called int GetSongIndex(string songTitle). This function assumes that the song is in the songList, and returns the index of the song. To obtain the index of the found song, use this: songIndex = songList.Items.IndexOf(songTitle); 4. Edit the FindButton_Click event handler to: a. Keep track of the index of the song that you found in the songList. To do this, declare an integer variable songIndex, which you initialize to 0. You will also need to declare a StringBuilder variable. b. If the song is in the songList, i. call GetSongIndex to obtain the index of the song ii. display the song title, genre, etc. in the outputText textbox such as the code below (finish the code below and include display in the outputText box) 5. Create a SongList_SelectedIndexChanged event handler for the songList ListBox by double-clicking on the songList control. This will get the index of the song that the user clicked on, and display its information in the outputText textbox. The code is very similar to what you just wrote for FindButton_Click. a. To get the index of the selected item, call songList.SelectedIndex, like this: songIndex = songList.SelectedIndex; 6. Add the Web View Control to your form. You may have to drag the Song List and Details boxes smaller to ensure the web browser fits on the page. In order to add the Web View control you will need to add a package. Right click on your project name in the solution explorer and choose Manage NuGet Packages 7. Click on Browse and type in WebView2 in the text box. Click on Microsft.Web.WebView2 and install it. 8. Open your toolbox and you should see WebView2 Windows Form control above the All Windows forms and Common Controls. Expand that menu 9. Add the WebView2 control to your form (you may need to drag your form larger). Then increase the size of the control. Name the control webViewDisplay. You must also specify a default source site in the properties window. For example http://www.microsoft.com 10. Open the code in Form.cs. Add the following statement at the top of the code with the rest of the using statements: using Microsoft.Web.WebView2.Core; 11. Add a “Play” button. Recall that clicking on an item in the songList places the song details into the outputText textbox. Add a small “Play” button (playButton) below the Web View 12. Double-click on the new “Play” button and fill in the code for the PlayButton_Click event handler. The code should: a. Get the index of the selected song in your songList songIndex=songList.SelectedIndex; b. Using the index of the selected song, obtain the URL for the selected song (urlArray[songIndex]) c. Send the URL to the Web View and play the video webViewDisplay.CoreWebView2.Navigate(url); 13. When you run your video manager you should see the Microsoft site appear immediately. If you don’t, you may need to download the web view runtime from Microsoft: https://developer.microsoft.com/en-us/microsoft-edge/webview2/ Please note, youtube may have ads so that when you click play you may have to watch the ad first or skip past them. In addition, use the Share button to obtain the URL from youtube: Add 5 songs, click on one of the songs in the song list and click Play. Take a screenshot or a video showing the song playing. Optional On Your Own Research file processing and store your song data in a file. Deliverables Week 4 · Submit your screenshot and code in the project deliverable. Course Project DeVry University College of Engineering and Information Sciences Screenshot of program running: Form code (only the code for the form, not program.cs): Course Project DeVry University College of Engineering and Information Sciences Course Number: CEIS247 Background Course Number: CEIS209 Background This course project is designed to help you practice using your skills. Each week, you will learn important concepts. Then, you will apply these concepts to build an amazing course project over the next seven weeks. What’s more, this project will have a Graphical User Interface (GUI) instead of using the console. This course project has two parts. For the first couple of weeks, you will be create a basic GUI and learn how to work with GUI controls while practicing basic programming concepts. After that, you will create an object oriented project. Part 2: Scenario You have been hired as a consultant to create a basic Payroll System for a small business. The business wants to keep track of basic employee information and print paychecks for the employees every two weeks. Your client has some basic functionality in mind, such as the ability to add and remove employees, display basic employee information, and print paychecks. Maintenance is key! You realize that Object-Oriented programming will provide the most efficient application that is easy to maintain and update as needed. Let’s get started! Week 5: Create a Windows forms application with basic controls and add an Employee Class Objectives 1. To start the course project 2. Design and create two Windows forms with GUI controls 3. Read from and update GUI control variables Introduction Steps 1. Start Visual Studio. You will see a Start Page that looks something like this. Read through it, and then click the “Create a new project” tile near the bottom, right corner. 2. Create a new Windows Forms App (.NET Framework) – C# version. If you do not see Windows Forms App (.NET Framework), simply type “Windows Forms App” in the search box and choose the C# version. Then, hit the Next button. 3. When you configure your new project, call it “Lastname_CourseProject_part2”. Make sure you change the location to somewhere that you will find it easily! Then, click the Create button. 4. Make a new form. You should be presented with a blank form like the one below. You are now ready to start designing your form! Currently it is called Form1, which is both boring and poor programming practice. A form, as well as forms controls, should have meaningful names, just like all other variables. Rename the form’s file in the Solution Explorer to MainForm. Then, add four Buttons and a ListBox to your form. Feel free to play with the Font, BackColor, or any other property! Have fun! The form above was set to a font size of 20. Feel free to do the same so your form looks like the one below. Object Name Text Form MainForm Payroll System Button AddButton Add Button RemoveButton Remove Button DisplayButton Display Button PrintPaychecksButton Print Paychecks ListBox EmployeesListBox n/a Your main form should look something like
Answered Same DayJun 16, 2022

Answer To: Course Project DeVry University College of Engineering and Information Sciences Course Number:...

Aditya answered on Jun 16 2022
85 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here