FontysICT-sem1

Additional tasks variables/strings

Case Study 1 - Find the Word

Write a program that satisfies the following requirements:

For example, in the sentence “The apple doesn’t fall far from the tree.” the word “apple” occurs at position 4.

Case Study 2 - BMI Calculator

Write a program that calculates a person’s BMI and displays it on the screen. Tip: prior to programming (=realization phase), you will conduct a brief preliminary research (=analysis) answering the following questions:

Case study 3 - Area calculator

Write a program that calculates the area of a circle. The user enters the centerline of the circle and the program displays the area of the circle with that centerline on the screen.

Tip: Perform a brief analysis in which you find out the answer to the question How do you calculate the area of a circle?

Case Study 4 - Listbox filler

Create a program with a ListBox, a TextBox and a Button. When the user clicks the Button then the text that is in the TextBox (the user can type in whatever he wants) is added to the list in the ListBox.

Case Study 5 - Ak-tester

Create a program that allows the user to enter a text and click a button. After clicking the button, a text appears on the screen indicating the position at which the phrase ak occurs.

Example scenario: the user enters the word “goudakaas”. The program should then show the result 5 after pressing the button (because the - first-occurring - substring ak is at the 5th position).

Case Study 6 - Your actual age

Create a program that given the user’s name (first name + last name) and his age shows the “actual age” that user is on the screen.

The “actual age” of a user is determined as follows:

Case Study 7 - Guess-a-number (if-statement)

Assignment: write an application that satisfies the following requirements:

Once this works then extend your application with the following functionality:

Case Study 8 - Converting distances to km.

In England they use ‘inch’, ‘foot’, ‘yard’ and ‘mile’. Create a program with a text box, radio button and button to convert this to kilometers. The user can enter a number in the textbox and then use radio buttons to choose what that represents.

For example, enter 1 in the textbox and then select the radio button for ‘mile’. When the button is pressed, the number of miles is displayed. In this example 1.6 km. Always round off to 1 decimal place.