CSCI 499 Unit #5

Purpose

Continue learning React.

Preparation

Read:

As in Unit 4, I strongly recommend that you type in the examples and try them in a browser. This program is more complex than the previous one, be sure to allow enough time to complete it.

Programming Assignment

Create a page similar to the following (example is for Valentine's Day, you can choose some other theme). Figure 1 shows a greeting card with default settings.

Greeting card when load
Figure 1: Greeting Card upon load

Figure 2 shows the same card after it has been "customized" by making selections in the Card Definition box.

Greeting card after changes
Figure 2: Greeting Card after selections

Specific Requirements

  • Use a loop to create the display (i.e., do NOT just have 5 lines of code with different color choices)
  • Hints

    For simplicity, I set up variables to contain the hard-coded color choices.

    
    	var foregroundColors = ["#00FFFF","#FF7F50","#FFD700", "#FFF", "#000"];
    	var backgroundColors = ["#0000FF","#DC143C","#20B2AA", "#FFF", "#000"];
    

    Potentially helpful links for dealing with the Ascii Art:

    The structure of this program will be similar to the last example on the Events in React page (the code that includes increase(e)). Be sure to understand that example before you begin to code! A few specific hints:

    You should draw your component design on paper before you begin to code (maybe review the design process from chapter 5). If you have questions, post on piazza or email me.

    Submit

    Name your file [YourLastName].html and submit on Canvas.

    Evaluation

    Because this assignment is more complex, I will assign two grades:

    For each of these grades, programs that meet all requirements will receive a grade of A. Programs missing one or two minor requirements will receive A-. Programs missing more substantial requirements will be graded accordingly.

    NOTE: A program that does not update at all will receive a failing grade for correct behavior - so be sure that you leave plenty of time to ensure at least some of the fields will update.