SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

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

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 6 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 26 Mar 2018 My Price 10.00

project is separated into two assignments,

This is a C# coding project that I am having trouble with. Attached is a zipped file that contains the skeleton of this program.

 

This project is separated into two assignments, so there will be two separate submissions, CS12a and CS12b. 

 

In Part 1 (CS12a) of the assignment students will code array declarations, load parallel arrays, look up array values, and display the content of the arrays. 

 

In Part 2 (CS12b) of the assigment students will sort and search the parallel arrays. 

 

Customer information (id, name, discount code) is stored in a data file and will be loaded into three parallel arrays. The discount code will then be looked up in a discount code array to get the discount rate. The appropriate discount rate should then be loaded into the 4th parallel array. The four parallel arrays should be able to hold up to 10 customers. The values in the four parallel arrays will be displayed in list boxes so that manipulation of the data can be displayed. Use two constant arrays to store the discount codes and discount rates. 

 

Additional Notes:

  • The headers for the various required methods are provided along with the interface code. 
  • To ease comparisons and manipulations, define the id array as int, name and discount code as strings, and rate as decimal. 
  • In loadArrays count and save the number of records loaded (cintNumberOf Customers). There should be three ReadLine statements within the while loop because there are three data items stored in the file for each customer and the order of the reads should be id, name, and discount code. 
  • The program should allow the user to load the arrays once, so the Load Arrays button should be disabled after the first use. 
  • In assignDiscountRate use nested for loops and the discount code read from the file to lookup the rate in the constant arrays. The comparion operator to use is == because an exact match needs to be found (if (cstrCode[c] == cstrDISCOUNT_CODE[r])). When a match is found move the rate from the contant rate to the corresponding parallel array (cdecRate[c] = cdecDISCOUNT_RATE[r];) 
  • In displayArrays display the values from all for parallel arrays. Use ToString("N2") to display the rate with two digits after the decimal point. 
The data for the constant arrays, Discount Code and Discount Rate, are as follows:        Discount
     Code     Rate
       A      0.03    Administrators
       F      0.05    Faculty
       S      0.10    Student
       X      0.00    No Discount
      
  • The data file CS12.txt is included in the archive and it contains an Id, Name, and Discount code for each customer. 
  • Each data item is stored on a separate line so use ReadLine. 
  • The order of the data in the file is Id, Name, and Discount Code, so the read statements must be in that order.
The actual data is shown below.
3030
Johnson
F
1010
Smith
S
4040
Lopez
A
6060
Sailor
X
2020
Davis
F
5050
Jones
S
  • Submit your entirely zipped solution which should include CS12Form.cs and CS12Form.Designer.cs

 

 

Attachments:

Answers

(5)
Status NEW Posted 26 Mar 2018 10:03 AM My Price 10.00

  ----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------  ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be-----------

Not Rated(0)