ComputerScienceExpert

(10)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 1 Week Ago, 1 Day Ago
Questions Answered: 4853
Tutorials Posted: 4847

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 28 Apr 2017 My Price 13.00

C# 2015 Extra 12-1 Create and use an Inventory Item class

I need to be done with this assignment.Both 12 and 13 should done separately to see step by step.

 

 

23 Extra exercises for We}! ’3 C# 2015 Extra 12-1 Create and use an Inventory Item class In this exercise, you’ll add a class to an Inventory Maintenance application and then
add code to the two forms that use this class. 3356-13 FOEDmhlSm-fi
3m umpire) 9210534 Era] pallets (31295:.
47m 'Jwaneaefied MabletSBSflfi] Open the project and add an InvItem class 1. Open the InventoryMaintenance project in the Extra
ExemisesunventoryMaintenance directory. Then, review the existing code for
both of the forms so you get an idea of how this application should work. 2. Add a class named Invltern to this project, and add the properties, method, and
constructors that are shown in the table below. Property Description Itanflo Getsorsetsanintthatcmtainslheitem’s
number. Description Gets orsets a string that ctmtains the item’s
description. Price Gets or sets a decimal that contains the item’s
pnce. Method Description GetDisplay’Iext {3 Returns a string that contains the item’s number,
description], and price finmatted like this:
3245649 Agapanthus ($195). (The item
mimber and description are separated by four
Spawn) Constructor Description 0 Creates an InvIfiem object with default values. (itemNo, description, price} CreatesanInVItemobjectw-iflithespecified
values.

Add code to implement the New Item form 3. Displaythe code for the New Item fonn, and declare a class variable named
invItem of type InvItem with an initial value of null. Extra exercises for Model: ’3 C# 2015 Add a public method named GetNewItem that displays the form as a dialog box
and returns an InvItem object. Add code to the btnSave_Click event handler that creates a new lnvItem object
and closes the form if the data is valid. Add code to implement the Inventory Maintenance form 6. 10. Displaythe code for the Inventory Maintenance form, and declare a class
variable named invItems of type List<InvItemZ> with an initial value of null. Add a statement to the frmInvMaint_Load event handler that uses the GetItems
method of the InvItemDB class to load the items list. Add code to the FillltemListBox method that adds the items in the list to the
Items list box. Use the GetDisplayText method of the InvIteIn class to format the
item data. Add code to the btnAdd_Click event handler that creates a new instance of the
New Item form and executes the GetNewItem method of that form. Ifthe InvItem object that’s returned by this method is not null, this event handler should add the new item to the list, call the Saveltems method of the InvItemDB
class to save the list, and then refresh the Items list box. Test the application to be
sure this event handler works. Add code to the btnDelete_Click event handler that removes the selected item
from the list, calls the SaveItems method of the InvItemDB class to save the list,
and refi'eshes the Items list box. Be sure to confirm the delete operation. Then,
test the application to be sure this event handler works.

25 Extra exercises for Woof! 's Cit 201 5 Extra 13-1 Modify a list class to use an indexer, a delegate, an event, and operators In this exercise, you’ll modify a class that stores a list of inventory items so it uses an
indexer, a delegate, an event, and operators. Then, you’ll modify the code for the
Inventory Maintenance form so it uses these features. Open the project and review the code 1. Open the InmtoryMaintenance project in the Extra Exercises\Chapter
l3\InventoryMaintenance directory. This is an enhanced version of the Inventory
Maintenance application from extra exercise 12-] that uses a list class. Review the code for the InvItemList class so you understand how it works. Then.J review the code for the Inventory Maintenance form to see how it uses this class.
Finally, run the application to see how it works. Add an index to the InvItemList class 3. Delete the GetltemByIndex method from the InvItemList class, andreplace it
with an indexer that receives an int value. This indexer should include both get
and set accessors, and the get accessor should check that the value that’s passed
to it is a valid index. lfthe index isn’t valid, the accessor should throw an
ArglnnenmutOfRangeException with a message that consists of the index value. Modify the Invoice Maintenance form to use this indexer instead of the
GetItemByIndex method. Then, test the application to be sure it still works. Add overloaded operators to the InvItemList class 5. Add overloaded + and - operators to the InvItemList class that add and remove
an inventory item from the inventory item list. Modify the Inventory Maintenance form to use these operators instead of the
Add and Remove methods. Then, test the application to be sure it still works. Add a delegate and an event to the InvItemList class 7. Add a delegate named ChangeI-Iandler to the InvItemList class. This delegate
should specify a method with a voidreturn type and anInvItemList parameter. Add an event named Changed to the InvItemList class. This event should use
the ChangeHandler delegate and should be raised any time the inventory item
list changes. Modify the Inventory Maintenance form to use the Changed event to save the
inventory items and refresh the list box any time the list changes. To do that, you’ll need to code an event handler that has the signature specified by the
delegate, you’ll need to wire the event to the event handler, and you'll need to remove any unnecessary code fron1the event handlers for the Save and Delete
buttons. When you‘re done, test the application to be sure it still works.

Attachments:

Answers

(10)
Status NEW Posted 28 Apr 2017 02:04 AM My Price 13.00

Win-----------dow-----------sFo-----------rms-----------App-----------lic-----------ati-----------on1-----------

Attachments

1570048034-WindowsFormsApplication1.zip
(1)