Week 2 Discussion Problems

Week 2 Discussion Problems - Week 2 Discussion Problems...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Week 2 Discussion Problems Designing and Implementing Classes 1. a) Design a Quiz class. The quiz has the following properties and methods: Item Description QuizName Property Holds the Name of the quiz, such as Quiz 1 TotalPossible Property This holds the total possible points on the quiz. Mark Property This property holds an individual’s points on the quiz CalcPercent Method This method has no parameters; all it does is divide the Mark by the TotalPossible and sends the resulting percent back to the calling program a) Design the class showing its name, properties and class methods b) Design the pseudo code or flowchart for the method c) Describe or create a windows form that would be capable of getting values for all properties and displaying the output of the method. d) What is the flowchart or pseudo code for the button click in this windows form/driver program? 2. Design a Lease class that has the following properties and methods: Item Description TenantNameProperty Holds the Name of the tenant Rent Property Holds the amount of the monthly rent DailyLateFee Holds the daily late charge for late payment of rent CalcTotalRent Method This method has one parameter – the number of days late. It uses this formula to arrive at the TotalRent including late fees: TotalRent= Rent + NumDaysLate*DailyLateFee It returns TotalRent to the calling program a) Design the class showing its name, properties and class methods b) Design the pseudo code or flowchart for the method c) Describe or create a windows form that would be capable of getting values for all properties and displaying the output of the method. d) What is the flowchart or pseudo code for the button click in this windows form/driver program? 3. Design a Company Class with the following properties and methods: Item Description CompanyName Holds the Name of the company AnnualSales Holds the annual sales of the company in dollars Annual Expenses Holds the total expenses for the year CalcProfit This method accepts no parameters, but calculates profit by subtracting the Annual Expenses from the Annual Sales. It returns the Profit to the calling program....
View Full Document

This note was uploaded on 07/27/2009 for the course BIS 311 taught by Professor Marshburn during the Fall '08 term at DeVry Cincinnati.

Page1 / 4

Week 2 Discussion Problems - Week 2 Discussion Problems...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online