Step-by-step solution file
1 CIS 340 - Business Information Systems Development -
Actually, Its C# program.
Can you tell me how to do this assignment?
How do I do the second part? Like showing the product category.
1 CIS 340 ? Business Information Systems Development - I
Assignment 4: Array-based Program
Due on Blackboard: Friday, October 7, by 11:59 PM Arizona Time Explanation and Hints The program requirements document shows that you need to record values for product names,
product categories, and prices for each product. We first need to decide on the data structure for
this array. We need multiple variable data types ? three of them. Rectangular arrays have two
dimensions only and have a single data type ? so that won?t work.
This data is more suited to have three independent arrays ? like the ones from Inclass6. Maintain
three parallel arrays. In the Inclass, there were two arrays, names and score. Here there are three
arrays ? the basic structure is the same! How to calculate averages?
You should use the accumulated totals structure to calculate totals ? you did this Inclass7 as well
as before it. Start with being able to calculate the totals/average for the entire array. However,
since we want category totals, that code will need to be modified. Say, you want the average
printed out for the Tech category. In this case, you should increment total only if the category is
Tech. You?ll still need to loop through the entire array ? however, you are adding to the total
only if the category is tech.
For an average, you also need to know the count of how many items you have. So, that?s another
variable you should have and maintain. Every, time you find a tech item, you can print out its
name, increment the tech total, keep a count, etc. This will allow you to calculate the average. 1 2 Once you have worked this out for one category, you should be able to do this for all categories
in separate loops. A slightly more sophisticated approach
A more sophisticated version wouldn?t need totals being calculated in separate loops. You could
really use only one loop with the help of a switch. Based on which category a particular item is,
increment the respective category total. 2
This question was answered on: Feb 21, 2020
This attachment is locked
We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy (Deadline assured. Flexible pricing. TurnItIn Report provided)
Need a similar solution fast, written anew from scratch? Place your own custom order
We have top-notch tutors who can help you with your essay at a reasonable cost and then you can simply use that essay as a template to build your own arguments. This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student. New solution orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.