Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Visual Studio - Movie Rental - C#

phm_357
phm_357 


Movie Rental Project Continuation: C# - Visual Studio 10 Comments in the code would be very helpful. Attached is what I have so far, and also an image of completed program. Project Instructions: Using your MovieRental project, add the following new features: 1. Add Item To Cart – (NEW) Create a partial class (file named customerOrder.cs). The namespace and class name need to match the namespace and class name of your FrmMovieRental.cs file. This partial class will contain programmer defined methods that help with individual customer order logic components - NO GUI components (No TextBoxes, No RadioButtons, No MessageBoxes, No GUI components). Required methods: implement and call methods to perform the following tasks (make sure the methods are logic components and NO GUI components are used): Each shopping cart item in the ListBox needs to include the fields of information in a comma delimeted format: category,title,type,$amt Category of Movie Title of Movie Type of Movie: DVD or Blu-Ray Cost of Movie: $4.50 DVD or $5.00 Blu-Ray Write a method that will build the item record string in the form: category,title,type,$amt Write methods that will parse the shopping cart item: category,title,type,$amt into the individual items and return the individual field. GetCategoryFromCartItem GetTitleFromCartItem GetTypeFromCartItem GetAmtFromCartItem You are welcome to create any additional methods to facilitate step-wise refinement of your program. Remember each method should only handle one task or one job. If you have any tasks that you code more than once, you need to make a method for it so that you can just re-use your method when you need to accomplish that task. 2. Check Out - UPDATE THIS WITH THE FOLLOWING: If the member checkbox has been checked, the customer receives 10% discount during Check Out Required method(s): write method(s) to generate a customer invoice and then use the method(s) in the Check out. To generate the customer invoice loop through the items collection of the shopping cart listbox and generate a string representing the customer invoice for the individual customer by parsing each individual field using the GetFieldFromCartItem methods. Customer Invoice: DVD: (1) Meet the Parents Blu-Ray: (2) GI Joe Avatar SubTotal: $9.50 Discount: $0.00 ------------------ Grand Totat: $9.50 Change the functionality of the Summary TextBox so that it displays the customer invoice. the quantity of DVD and corresponding categories and titles, quantity of Blu-Ray and corresponding categories and titles, the sub total cost, discount amount and grand total cost as shown above. 3. Start New Order (NEW) Add a Start New Order button. When clicked the form gets reset for a new customer order. Add the functionality to keep track of the number of customers. Attachments Tags
Clarifications

Answers

C# Movie Rentals Solution

Seeker
Seeker 



VS2010 Solution Attached Attachments
MovieRentals.zip (228 K) Download



























Preview
return null; } private string GetCategoryFromCartItem(string item) { return ParseLine(item)[0]; } private string GetTitleFromCartItem(string item) { return ParseLine(item)[1]; } private string GetTypeFromCartItem(string item) { return ParseLine(item)[2]; } private string GetAmtFromCartItem(string item)

Preview
"Select Movie Title"; string category = cbxCategorySelectBox.SelectedItem.ToString(); foreach (Movie single in movies) { if (single.Category.Equals(category)) { cbxSelectMovieBox.Items.Add(single.Title); } } } private void lbShoppingCart_SelectedIndexChanged(object sender, EventArgs e) { if (lstShoppingCart.SelectedIndex >= 0) { btnCancelItem.Enabled

Preview
btnAddtoCart // this.btnAddtoCart.Location = new System.Drawing.Point(110, 272); this.btnAddtoCart.Name = "btnAddtoCart"; this.btnAddtoCart.Size = new System.Drawing.Size(90, 22); this.btnAddtoCart.TabIndex = 5; this.btnAddtoCart.Text = "Add to Cart"; this.btnAddtoCart.UseVisualStyleBackColor = true; this.btnAddtoCart.Click += new System.EventHandler(this.btnSubmit_Click); // // btnExit // this.btnExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;

Preview
Movie { public string Category { get; set; } public string Title {

Preview
236 470_C#\ASSIGNMENTS\MovieRentals\MovieRentals\MovieRentals\obj\x86\Debug\MovieRentals.csprojResolveAssemblyReference.cache F:\RED ROCKS COURSES_2012\CSC 236 470_C#\ASSIGNMENTS\MovieRentals\MovieRentals\MovieRentals\obj\x86\Debug\MovieRentals.FrmMovieRentals.resources F:\RED ROCKS COURSES_2012\CSC 236 470_C#\ASSIGNMENTS\MovieRentals\MovieRentals\MovieRentals\obj\x86\Debug\MovieRentals.Properties.Resources.resources F:\RED ROCKS COURSES_2012\CSC 236 470_C#\ASSIGNMENTS\MovieRentals\MovieRenta

Preview
entry point for the application. /// </summary> [STAThread] static void Main() {

Preview
Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("MovieRentals")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Hewlett-Packard")] [assembly: AssemblyProduct("MovieRentals")] [assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2013")] [assembly: AssemblyTrademark("")] [assemb

Preview
</summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } internal static System.Drawing.Bitmap movierent { get { object obj = ResourceManager.GetObject("movierent", resourceCulture); return ((System.Drawing.Bitmap)(obj)); }

Preview
code was generated by a tool. // Runtime Version:4.0.30319.296 // // Changes to this file may cause incorrect behavior and will be lost if // the code

Screenshots
Purchase Answer