Introduction To Programming
10-152-310

Learning Plan 2 : Variables and Data Types

Student

  • Name:
  • Section:
  • Email:

2.1 Project - Part 3

  • Open this file in your browser and Microsoft Visual Studio
  • Add your name, section, and email

Problem Statement

Write a program that prompts for the names of two (2) flowers and stores them. The program then displays the entered names from storage with labels. The names are then swapped in their storage locations, the first name is put in the second one's storage and the second name is put in the first one's storage. The names are then displayed again from storage with labels.

NOTE: No more than three variables are allowed for this part. You must output the two variables in the same order for the "Strings as entered" output and the "Switched strings" section. You can't just output each variable in reverse order. You actually need to swap the data from one variable into the other.

The Program Planning Lists

  • In the following pre tag, write the three planning lists based on the verbs and nouns you see in the problem statement.
    The List of Input Variables:
    
    The List of Output Variables:
    
    The Process Checklist:
        

JavaScript Output

Write the JavaScript code based on everything you've done. Your code must follow the course coding standards.

  • Sample Output: (You don't have to name your variables the same as in this sample.)
    Strings as entered:
      variableOne: Rose
      variableTwo: Daisy
    
    Switched strings:
      variableOne: Daisy
      variableTwo: Rose
        
  • Part 3 Output: