logo

CS 260 Homework 5 Modification

   

Added on  2019-09-16

2 Pages587 Words184 Views
 | 
 | 
 | 
CS 260 Homework 5Fall 2017 Due: November 3, 2017This is an individual assignment – design, code and debug your own projectAs always, you may seek assistance from the instructor1) Make corrections to Homework 4 Make sure you are getting the correct answersChange code based on instructor feedback2) Modify Homework 4 (Payroll) to add the following elements:Edit the first and last names oChange the first letter to capital and all other letters to lower caseAdd a SortedList to your program – the Key will be a department number and the Value will be a department name. Add the following data to the SortedList (It’s easiest to initialize to these values when you declare it)14Sales18Human Resources23Marketing29Research and Development34Customer Service37Finance51Production52Legal66Logistics73Purchasing75Information TechnologyAdd a ListBox or ComboBox to your form to hold the department numberFill the ListBox or ComboBox with JUST the department numbers from the SortedListoUsing a loop, grab just the keys from the SortedList and add to the ListBox or ComboBoxoDo not hand type the department numbers into the properties windowValidate InputoUse the validation functions from the textbook – IsPresent, IsDecimal, IsWithinRange, etc.oWrite one IsValidData function with Compound conditions in a single return statement (as shown in book – bottom of page 225)oValidations:First NamePresentLast NamePresentHours workedPresent (not empty), Double, >=0, <=60Pay ratePresent, Decimal, >0, <= 99.99YTD GrossPresent, Decimal, >=0, <= 999,999.99AllowancesPresent, Integer, >= 0, <= 20Your organization has branches in several states. Each state has its own state tax rate. Create two arrays (parallel arrays) – one for state names (string) and one for state tax rates (double) (see below)oMichigan4.25%oIndiana3.23%oIllinois4.95%I would not use constants for tax rates, since youoSouth Dakota0.0%may have up to 50 in the futureoColorado4.63%
CS 260 Homework 5 Modification_1

End of preview

Want to access all the pages? Upload your documents or become a member.