A property that holds the number of items in a ListBox
Added by Scott S.
Close
Step 1
Step 1: Create a property called "ItemCount" in the ListBox class. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 70 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Use VB.NET. Add a listbox to your form with 4 choices: t-shirt, sweatshirt, hoodie, or shorts. When the user clicks on the associated button, determine which item the user has selected in the listbox and print out a message of the cost of their selection. A t-shirt costs $12.50, a sweatshirt costs $25.50, a hoodie costs $30.00, shorts cost $10.00, and it is $0.00 if nothing is selected.
Akash M.
Total Sales: Use the attached file named Sales.txt. Create an application, using C#, that reads the file's content into an array, displays the array's content in a ListBox control, calculates the total of the array's values, average sales, largest sales, smallest sales. Display the Total Sales, Average sales, Highest Sales, and Smallest Sales. The form should look similar to the attached picture. Sales.txt includes: 1245.67 1189.55 1098.72 1456.88 2109.34 1987.55 1872.36 Sales and Analysis - Total Sales - Average Sales - Highest Sales - Smallest Sales - Analyze Sales
Part 2: Write a program that will allow the user to enter series of numbers and will give some useful statistics about the numbers. This program should be composed of two events: Enter Numbers Button Click-Allow the user to enter series of numbers using input dialog boxes. Use a loop and add the numbers to the listBox as they are input,. Prompt the user to enter"x" to stop adding numbers. Compute Statistics Button Click -Compute the following statistics from the numbers in the listBox: Count, Sum, Average,Minumum, Maximum,Count of even #s,Count of negative #s A sample of the form layout and execution is shown below: PP4_Part2_115 Enter Numbers Into List Compute List Statistics Count Sum Average Minimum Value Maximum Value Even # Count Negative # Count
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD