C# AssignmentMakeup List:
ProgramAssign1Docs
Chap2Exercises
ProgrammingAssing2Docs
ProgramAssign2
Chap3Exercises
ProgramAssign3Docs
ProgramAssign3
Chap4Exercises
ProgramAssign4Docs
ProgramAssign4
Chap5Exercises
ProgramAssign5Docs
ProgramAssign5
Chap6Exercises
ProgramAssign6Docs
ProgramAssign6
Chap7Exercises
ProgramAsssign7Docs
ProgramAssign7
Chap8Exercises
ProgramAssign8Docs
Midterm (2-7 quizzes)
--------
Java AssignmentMakeup List:
Chap3Program
Chapter 03 Exercise 10 - Page 153.
10. a. Create a class named 'Student'. A 'Student' has fields for and ID number,
number of credit hours earned, and number of points earned. (For example,
many schools compute grad point averages based on a scall of 4, so a three-
credit-hour class in which a student earns an A is worth 12 points.) Include
methods to assign values to allo fields. A 'Student' also has a field for grade
point average. Include a method to compute the grad point average field by
dividing points by credit hour earned. White methods to display the values in
each 'Student' field. Save this class as Student.java.
b. Write a class named 'ShowStudent' that instantiates a 'Student' object from
the class you created and assign values to its fields. Compute the 'Student'
grad point average, and then display all the values associated with the
'Student'. Save the application as ShowStudent.java.
c. Create a constructor for the 'Student class you created. The constructor
should initialize each 'Student';s ID number to 9999, his or her points earned to
12, and credit hours to 3 (resulting in a grade point average or 4.0). Write a
program that demonstrates that the constructor works by instantiating an object
and display the initial values. Save the application as ShowStudent2.java.
Chap5Program
Start 0222Exercise05-#6 (due 10pm)
Chapter 05 Exercise 06 - Page 253.
6. Write an application that prompts the user for two integers and then prompts the user to enter an option as follows: 1 to add the two integers, 2 to subtract the second integer from the first, 3 to multiply the integers, and 4 to divide the first integer by the second. Display an error message if the user enters an option other than 1 through 4 or if the user chooses the divide option but enters 0 for the second integer. Otherwise, display the results of the arithmetic. Save the file as Calculate.java.
Chap6Program
Start 0229Exercise06-#9 (due 10pm)
Chapter 06 Exercise 09 - Page 296 & 297
9. a. Write an application that displays the results of a series of 10 coin tosses.
Use the 'Math.random()' function explained in Appendix D to generate a number
between 0 and 1; you will use a statement similar to:
result = Math.random();
After each coin toss, display whether the toss represents "heads" or "tails." If
the results is 0.5 or less, the results represents heads; otherwise, it represents
tails. After the 10 tosses are complete, display the percentages of heads and
tails. Run the application several times until you are confident that the coin
tosses occur randomly. Save the file as FlipCoin.java.
b. Modify the application in Exercise 9a so that you generate 1,000 coin tosses
and keep track of the heads and tails. Do not display the coin toss result with
each flip, but instead display percentages of heads and tails after the 1,000
coin tosses are complete. Save the file a FlipCoin2.java.
Chap8Program
Start 0307Exercise08-#8 (due 10pm)
Chapter 08 Exercise 08 - Page 377.
8. Write an application that allows a user to enter the names and phone numbers
of up to 20 friends. Continue to prompt the user for names and phone numbers
until the user enters "zzz" or has entered 20 names, whichever comes first. When
the user is finished entering names, produce a count of how many names were
entered, but make certain not to count the application-ending dummy "zzz" entry.
Then display the names. Ask the user to type one of the names and display the
corresponding phone number. Save the application as PhoneBook.java.
Chap9Program
Chapter 09 Exercise 06 - Page 421.
6. Create an application that contains an enumeration that represents the days of the
week. Display a list of the days, then prompt the user for a day. Display business
hours for the chosen day. Assume that the business is open from 11 to 5 on Sunday,
9 to 9 on weekdays, and 9 to 6 on Saturday. Save the file as DayOfWeek.java
Chap7Program
Start 0328Exercise07-#8 (due 10pm)
Chapter 07 Exercise 08 - Page 335
8. Three-letter acronyms are common in the business world. For example, in
Java you use the IDE (Integrated Development Environment) in the JDK (Java
Development Kit) to write programs used by the JVM (Java Virtual Machine)
that you might send over a LAN (Local Area Network). Write a program that
allows a user to enter three words, and display the appropriate three-letter
acronym in all uppercase letters. If the user enters more than three words,
ignore the extra words. The figures below, show a typical execution. Save the
file as ThreeLetterAcronym.java.
Midterm
Quizzes - 3-7
----------------------
C++ AssignmentMakeup List:
ProgramAssign2
Chap3HWAssign
ProgramAssign3Plan
ProgramAssign3:
Program - Calculate forecasted sales and revenues (arrays)
CIS162AC - C++
Problem Description
The CEO of XYZ Manufacturing wants to see the effectiveness of what a new advertising campaign could do for the company. His top executive team has informed the CEO that XYZ Manufacturing's main competitors have not spent on any advertising for the past four years. The executive team believes that if they strategically place their advertising campaign they could have a competitive advantage and increase their revenues. The plan is to unveil the advertising campaign a month prior to their big selling season. XYZ Manufacturing produces wet suits for killer whale expeditions in Vancouver, Canada. Their business is cyclical and have their highest demand in the summer months of June, July, and August. The executive team believes that if they implement their advertising campaign in May, sales should increase by 25% for June, July, and August. In order to forecast the impact of the advertising campaign, the CEO decides to look at 2011 sales numbers. The sales numbers for 2011, are provided below:
2011 Sales
Month Unit Sales
January 147
February 135
March 200
April 335
May 650
June 1,424
July 1,753
August 1,654
September 650
October 220
November 184
December 73
Using the 2011 Sales numbers, the CEO can calculate the forecasted sales in units for June, July, and August and measure the potential effectiveness of the advertising campaign. The CEO wants to find out what the actual impact will be to revenues in June, July, and August. Each unit sells for $130.00. As stated above, it is believed that sales should increase by 25% for each of these months. The CEO wants a report that includes the three months (June, July, August), and their sales in units, and their revenues.
Assignment Goal:
This assignment will help you develop your skills in working with arrays. In addition, it will help you continue your expertise with working with methods. For this assignment, I want you to concentrate on breaking down your program into small individual tasks. This makes it easier to attack the problem in smaller more manageable parts. In addition, it makes testing and debugging easier as individual tasks can be tested and debugged individually.
Assignment Specifications:
Your programming project requires you to create methods to 1) calculate the forecasted sales for June, July, and August in 2012, and 2) calculate the forecasted revenues for those same months in 2012. There is no input needed for this programming assignment. All of the important variables for this assignment is provided above in the Problem Description. For this project, I want you to create an array that contains the unit sales for 2012. I want you to pull out of the array the unit sales for June, July, and August. With your unit sales values you can calculate the forecasted sales and the corresponding revenues for June 2012, July 2012, and August 2012. I would like to see if you can print the output for this program in a separate method as well.
Fast forward to September 2012
The advertising campaign was kicked off in May 2012. Now that it is September 2012, the CEO can actually measure the effectiveness of the campaign. The actual numbers are provided below:
2012 Sales
Month Unit Sales
June 2,247
July 1,824
August 1,973
Using what you have learned about arrays in Chapter 4, update the array with these updated values. Since, we are only concerned with June, July, and August just update the array with the numbers for these months (don't worry about Jan - May). I want you to show me in your code the correct way to update contents of an array. After the array has been updated, use these updated sales units values to calculate the actual revenues for June 2012, July 2012, and August 2012.
Deliverables (what you are to submit):
1. A planning document using pseudocode, IPO diagram or flowchart.
2. A mock screen showing the output of your program.
3. A set of test data with expected results.
Chap4HW
Chap4Quiz
ProgramAssing4Plan
ProgramAssign4:
Program - Calculate total resource budget amount (array of structures)
CIS162AC - C++
Problem Description
Bridget Pino is a Technology Project Manager at a leading bank in Scottsdale. She is currently managing a new development effort to build a major application for the Credit Card Division of the bank. Bridget has just been assigned five new resources to help in the development of the Credit Card application. Her team consists of the following resources:
First Name Last Name Type of Resource Skill Pay Rate Allocated Hours
Sheila Chu Developer C++ $38.00 480
Steve Dahlman Systems Analyst SQL $35.00 360
Mike Hammond Developer C++ $38.00 480
Greg McDole Developer ETL $36.00 360
Heather Tang Business Analyst Documentation $32.00 500
Bridget wants to track her resources hours and her budget for each of her project resources. Since the project just started, Bridget wants to achieve two major objectives with this program. First, she wants to store her project resources information into a C++ data structure. (Hint: all of the resources information provided above can be stored in an array of structures - look at page 137-139 in your textbook for guidance). Second, Bridget wants to calculate the total budget amount for each of her project resources.
Assignment Goal:
This assignment will help you develop your skills in working with structures and arrays. In addition, it will help you continue your expertise with working with methods.
Assignment Specifications:
Your programming project requires you to: 1) Declare (define) your structure, 2) initialize the array of structures with the resource information provided above (Hint: look at Listing 4.13 page 138 in your textbook), and 3) calculate the total budget amount for each project resource. (Hint: for a resource, the total budget amount = pay rate * allocated hours; Steve Dahlman's total budget amount for example would be 35 * 360 = 12,600).
Your programming project requires you to create one method besides your main() function. This method will need to calculate the total budget amount for each project resource.
Since your textbook has not covered loops to this point, simply have five separate statements that pull out the required resource information from each structure in the array. You will need to pull every resource structure from the array by using subscripts [0] - [4] and also pull out the correct fields (Pay Rate and Allocated Hours) from each resource structure by using the dot operator. Then you can call your method to calculate the total budget amount for each resource. The printing requirement for this assignment is for the program to display to the screen the Resource Name, Pay Rate, Allocated Hours, and Total Budget Amount for each resource. You will display 5 lines to the screen, one line for each resource. Since this program is quite complex, you can print from the main() function. However, if you create your own method to print and display the contents to the screen you can receive extra credit. You can receive up to 5 extra credit points.
Deliverables (what you are to submit):
1. A planning document using pseudocode, IPO diagram or flowchart.
2. A mock screen showing the output of your program.
3. A set of test data with expected results.
Chap5HW
Chap5Quiz
ProgramAssign5Plan
ProgramAssign5:
Program - Decision Structures
CIS162AC - C++
Assignment Goal:
In this chapter, we discussed decisions and the different structures used to make decisions. Decisions allow your program to take different courses of action based on either data entered into a program or calculated results.
Assignment Specifications:
Write a program with a method called CalculateDeductions that determines the amount of a payroll deduction. Deductions can be a percentage, a fixed amount, or none based on a deduction code. Write a program to allow a user to enter Gross Pay, a deduction code and an amount and display the results. Deductions are calculated as follows:
Deduction code = “N”: Deduction is zero.
Deduction code = “F”: Deduction is a fixed amount and the amount entered is dollars and cents.
Deduction code = “P”: Deduction is a percent of Gross Pay and the amount entered is a percentage. The percentage must be less than or equal to 80%.
Regardless of the deduction type, the deduction amount cannot exceed the Gross Pay. However, the deduction may cause the Gross Pay to be zero.
Your program should have methods for entering data, calculating the deduction amount, and displaying the results.
Deliverables (what you are to submit):
1. A planning document using pseudocode, IPO diagram or flowchart.
2. A prototype screen showing the output of your program
3. A set of test data with expected results.
Chap6Quiz
Chap6HW
ProgramAssing6Plan
ProgramAssign6:
Program - Loops
CIS162AC - C++
Assignment Goal:
Loops allow processing on large sets of data. They are paramount for processing files. This assignment will require both inner and outer loops.
Assignment Specifications:
Write a program called CalculateInvoice that allows a user to enter invoice items for multiple customers and calculates a total invoice amount. For each customer, enter a customer number and customer name. Then, for each customer allow the user to enter any number of items. Data to be entered for each item is the description, quantity, and price. For each item calculate the extended amount by multiplying the quantity times the price. Add each extended amount to a total for the customer. If the invoice amount is over $500, the customer gets a 5% discount. After the discount has been calculated, calculate a sales tax of 8.25%. Display the invoice total before discount, the amount of discount, amount of sales tax, and total invoice amount.
You will have methods for each basic function; data entry, calculation of values, and display the final results.
Deliverables (what you are to submit):
1. A planning document using pseudocode, IPO diagram or a flowchart.
2. A prototype screen showing the output of your program.
3. A set of test data with expected results.
4. Your complete project folder in zip format.
Chap7HW
Chap7quiz
ProgramAssign7Plan
ProgramAssign7:
Midterm