Assignments

ASSIGNMENT 1 - ASSIGNMENT 2 - ASSIGNMENT 3

The purpose of the assignments is to encourage further practice for the topics covered in our book but not covered in class (due to time constraints) and to give you the opportunity to work on more comprehensive exercises than those covered in the book. Rather than giving you homework assignments centered on different topics, I prefer to give you homework assignments that build and refine a single solution. This semester's assignments will automate the real estate web site. 

Assignment Submitting Standards:

  1. All assignments are due at the beginning of the class period.
  2. Late assignments will NOT be accepted.
  3. All assignments should be submitted in a 9x12 manila envelope with the cover letter statement (click for sample) attached (stapled, glued, taped) to the the outside of the envelope.
  4. Printed copy of your source code.
  5. The System Test plan completed and signed including printout of your output (click for sample).
  6. A CD with ALL the source code.

ASSIGNMENT 1 (work with a peer) top

PURPOSE

The purpose of this assignment is to provide you with a comprehensive exercise to practice the following material:

  1. Review some of the material you learned in MIS 15 and MIS 120

  2. Understand UML Diagrams and translate them into code

  3. Write multi-page web applications

  4. Use drop-down lists and list boxes

  5. Use session state

  6. Add validation controls to a form

  7. Use cookies

  I will demonstrate this web form in class and will provide more clarification.

Files Needed: MIS124Assignment1Files.zip

Here is the Solution on my server: http://130.86.61.56/Assignment1/

Application Design

User Interfaces

Default.aspx:

  1. Web form in Figure above is displayed (use your own coordinates for the controls as long as they appear similar to Figure above). Also, make sure that the data in all text boxes are the default data so I do not have to retype all the data when testing your application.
  2. List box lists all the Loan Interest Rates for the Loan Years radio button (use the clsRates class).
  3. When a Loan Interest Rate is selected, the appropriate Loan Points are displayed (use the clsRates class).
  4. All text fields with white background are Text Boxes.
  5. First graphic image is the Submit (Calculate) button and the second clears all the typed data.
  6. When the Calculate button is clicked, Result.aspx page is displayed (Figure below).
  7. Create the methods shown in the Class Diagram above (or similar to the class diagram above).
  8. If non numeric data is entered in any of the text boxes, your program should handle these errors using exceptions with an appropriate message displayed to the user.
  9. None of the text boxes should be empty (use field validators), as shown later.

Result.aspx:

  1. Web form in Figure above is displayed (use your own coordinates for the controls as long as they appear similar to Figure above).
  2. ALL data from the first form is displayed.
  3. Use the appropriate classes to calculate the Montly Benefits, Estimated Montly Costs, and Monthly Gain/Loss
  4. Gains appear in Green color. Losses appear in Red color.
  5. All calculated amounts in this panel are formatted as currencies.
  6. Calculations:

Appreciation = HousePrice * AppreciationRate / 100 / 12
TaxSavings = (-Loan.calcInterest + Property.calcPropertyTaxes * 12 - 10000) * (FederalTaxRate + StateTaxRate) / 100 / 12
EquityAppreciation = (Loan.PaymentAndInterest + Loan.calcInterest / 12)
TotalBenefits = Appreciation + TaxSavings + EquityAppreciation + RentCost
OpportunityCostDP = Costs.calcTotalClosingCosts(DownPayment) * OpportunityCost / 100 / 12
OpportunityCostMP = ((Loan.calcTotalPITI + Property.calcTotalBills - TaxSavings - RentCost) * OpportunityCost / 100 / 12)
Maintenance = HousePrice * 0.003 / 12
TotalCosts = Loan.calcTotalPITI + Property.calcTotalBills + OpportunityCostDP + OpportunityCostMP + Maintenance
Result = TotalBenefits - TotalCosts

Validation and Business Rules

In the Default.aspx form, use the validations shown above.

  1. For any other error message that violates business rules (found as exceptions in the domain classes), show the Error.aspx page, shown above, with the appropriate error message.

Other

  1. ALL the Personal information in the Default.aspx form (5 fields) are stored in a Cookie when the Calculate button is clicked. When the Default.aspx form is displayed, the data stored in this Cookie will be retrieved and will populate the Personal Information text boxes.
  2. Modify the About.aspx web page with your personal information, as shown below:

ASSIGNMENT 2 (work alone) top

PURPOSE

The purpose of this assignment is to provide you with a comprehensive exercise to practice the following material:

  1. Manage session state

  2. Pass objects from one web form to another

  3. Work with databases

Database Design

Database uses the same connection string, user name, and password that we have been using for our Lab assignments.

Application Design

User Interfaces

Default.aspx:

  1. Web form in Figure above is displayed (use your own coordinates for the controls as long as they appear similar to Figure above).

  2. Here is a list of the controls:

    1. Image that displays the selected property's picture. When the page loads, it shows a stock picture or, you may display the picture of the first property.

    2. Label, below, to display the selected property's address.

    3. Grid View to display all properties but only 5 at each page. Grid View allows you to select and edit a record (only edit the property data and NOT the picture).

    4. This button takes you to the Info.aspx page (it is the Default.aspx from assignment 1), as shown in the image below. The Info.aspx page is the same as in assignment 1 except that the House Price (from the selected Grid View property) is passed to the Info.aspx page (look at the URL address in the image below). This button is only visible when the user selects a Property from the Grid View.

    5. This button takes you to the PropertyManagement.aspx page (shown below) where you can add a new Property to the database.

Info.aspx

  1. The Info.aspx is identical to the Default.aspx from Assignment 1 except that it receives and displays the property price.

PropertyManagment.aspx

  1. FileUpload control, allows you to select a property image from your computer and insert it (along with the other property data) to the database.

  2. This button executes the data insert to the database.

  3. This button cancels the insert and takes you to the Default.aspx.

Here is the stock picture:

   private void displayPicture()
      {
      string strPropertyID = GridView1.SelectedRow.Cells[1].Text;
      imgPropertyImage.ImageUrl = "PicturePage.aspx?PropertyID=" + strPropertyID;
      }

'This is a page that receives a propertyID, seaches for the picture in the database for that property
'and writes the property picture in Binary (passes the picture) to the calling page
    public partial class PicturePage : System.Web.UI.Page
   
{
        protected void Page_Load(object sender, EventArgs e)
      
{
           int intPropertyID = int.Parse(Request["PropertyID"]);
           Context.Response.ContentType = "image/jpeg";
           Context.Response.BinaryWrite(clsPropertyDA.findPicture(intPropertyID));
      
}

         }

Copy the PicturePage Page_Load code to an empty web page.

Here is the answer to Assignment 1, with small modifications to make it easy for you to start Assignment 2. You may freely use some or all of its content.

Here is a backup of the database. SacRetail.zip

ASSIGNMENT 3 (work alone) top

PURPOSE

The purpose of this assignment is to provide you with a comprehensive exercise to practice the following material:

  1. Deploy Web Applications

  2. Send email

  3. Work with Ajax Controls

  4. Create charts

    Files Needed:

    You need the following files to complete all assignments:

    SOLUTION DESCRIPTION

    For this application, you must modify the web pages from Assignment 1. To work on these modifications, you must install the Ajax Toolkit  (use NuGet to install).

    1. Add a Pie Chart to display the Estimated Monthly Costs in the Result.aspx page, as shown in the image below. For more help http://ajaxcontroltoolkit.devexpress.com/PieChart/PieChart.aspx.

    2. Add a e-mail image button to the Result.aspx page. Also, add a "Popup Control Extender" that will appear when you click on the e-mail image button. This pop up is to define the e-mail address of the receipient. Use the e-mail content as you see fit. When you click Ok in the pop up, the e-mail will be sent. For more help: http://ajaxcontroltoolkit.devexpress.com/ModalPopup/ModalPopup.aspx.

    3. Add BalloonPopups to the EMAIL image button (on mouse over; define your own message for the popup) in the results.aspx web page. More help is here: http://ajaxcontroltoolkit.devexpress.com/BalloonPopup/BalloonPopup.aspx. .

    Figure 3.1

    Publish your solution to my server. For security reasons, I will sent you the pubish information. NOTE: This requirement has been removed.