CS 260 Homework 5: Payroll with SortedList and Validation
Added on -2019-09-16
CS 260 Homework 5 is an individual assignment that requires designing, coding, and debugging a payroll project with SortedList and Validation. The project involves modifying Homework 4 (Payroll) to add elements such as SortedList, ListBox or ComboBox, and validation functions. The assignment also requires creating two parallel arrays for state names and tax rates, searching for a matching state, and displaying output in an attractive manner. The course code is CS 260, and the course name is not mentioned. The college or university is not mentioned.
| 2 pages
| 587 words
| 184 views
Trusted by 2+ million users, 1000+ happy students everyday
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%
Found this document preview useful?
You are reading a preview Upload your documents to download or Become a Desklib member to get accesss