Lesson 3 – Variables

Find the Course here.


Introduction:
The newly started database company Data Container needs you to create some variables to help them store and label their customers data.


What you will learn:

  • Primarily:
    • The most common variable types: String, Integer, Double, Boolean, Array, List, DataTable
  • Secondarily:
    • Best practice and naming conventions

Client Name: Data Container


Process Name: DataStorage


Description: Data Container stores a lot of different data for their clients and they therefore need you to create a lot of different variables and make sure that they work:

  • Create a string variable called strCompanyName and assign it a value.
  • Create an integer variable called intCompanyNumber and assign it a value. Increment the value by 1. Then multiple the value by 2.
  • Create a double variable called douPrice and assign it a value. Multiply the value by 2.
  • Create three boolean variables. Call them boolHighDemand, boolGoodPrice and boolGreatBusiness. The variable boolGreatBusiness must be a function of the two other variables. Play around with the values.
  • Create an array of strings called arrProducts. Assign it a value and change the values. Try to add a value and see what happens.
  • Create a list of strings called listProducts. Assign it a value and change the values. Try to add a value and see what happens.
  • Create a datatable variable called dtProductPrices. Add rows of data to it. Add a column called ‘InStock’ and fill it with data.

Inspect and examine the values of the variables with ‘Write Line’ activities.

Leave a Reply