Project 4: Solving Problems

Your homework project involves solving a series of problems. To complete this project you'll need to download problem solving project below.

Instructions

To complete this project follow these steps.

1. Use this download link to get a copy of this homework project on your computer.

2. Move the file problems.7z to your homework folder.

3. Extract the contents of file above.

4. Use the Lazarus IDE to open the project problems.lpi.

You will need to write code for the problems 1 through 40 to complete this homework project. Scroll down in the main unit to see the problems. Beginning with problem 1 you should see the following code:
procedure TProblemsForm.Problem1;
begin
  { Add the contents of the edit to the listbox then remove the contents of the edit }
end;
Below the comment with the problem instructions provide the necessary code to solve the problem. Run the project, select the problem on the left, and click the run button to test your solution.

If you think your solution works move on to the next problem and repeat with the next problem. If you get stuck on a problem consider moving on to the next problem. Solve as many problems as you can.

Here is a full listing of all the problems.
procedure TProblemsForm.Problem1;
begin
  { Add the contents of the edit to the listbox then remove the contents of the edit }
end;

procedure TProblemsForm.Problem2;
begin
  { Overwrite the contents of the listbox with the contents of the memo }
end;

procedure TProblemsForm.Problem3;
begin
  { Remove all the contents of the listbox }
end;

procedure TProblemsForm.Problem4;
begin
  { If the checkbox is checked then add the content from the edit to the memo }
end;

procedure TProblemsForm.Problem5;
begin
  { If the checkbox is checked then remove content from the edit, combobox, memo, and listbox controls }
end;

procedure TProblemsForm.Problem6;
begin
  { If the checkbox is checked then add the word 'Yes' to the listbox, otherwise add 'No' }
end;

procedure TProblemsForm.Problem7;
begin
  { Change the contents of the edit control to all upper case characters using the UpperCase function }
end;

procedure TProblemsForm.Problem8;
begin
  { Change the contents of the memo control to all lower case characters using the LowerCase function }
end;

procedure TProblemsForm.Problem9;
begin
  { Set the contents of the combobox items to all the font names on your computer }
end;

procedure TProblemsForm.Problem10;
begin
  { Set the name of the font of the main form to Courier New }
end;

procedure TProblemsForm.Problem11;
begin
  { Move the form to the Left by 100 }
end;

procedure TProblemsForm.Problem12;
begin
  { Increase the Width of the form by 100 }
end;

procedure TProblemsForm.Problem13;
begin
  { Change the color of the checkbox to 255 and the color of the memo to 0 }
end;

procedure TProblemsForm.Problem14;
begin
  { Change the color of the listbox to the value of edit control }
end;

procedure TProblemsForm.Problem15;
begin
  { Remove the contents of the memo and disable it }
end;

procedure TProblemsForm.Problem16;
begin
  { Load the file problems.txt into the memo }
end;

procedure TProblemsForm.Problem17;
begin
  { Set the contents of the edit to the number of characters in the memo using the Length function. Eg. If the memo has the text 'Hello' the edit will have the number 5 }
end;

procedure TProblemsForm.Problem18;
begin
  { Set the Position of the pair splitter to half its Width }
end;

procedure TProblemsForm.Problem19;
begin
  { Move the checkbox to the Top of the panel }
end;

procedure TProblemsForm.Problem20;
begin
  { Change the checkbox content to the contents of the edit }
end;

procedure TProblemsForm.Problem21;
begin
  { Set the Font Name of the memo to the contents of the edit }
end;

procedure TProblemsForm.Problem22;
begin
  { Copy the contents of the memo to the listbox and combobox items }
end;

procedure TProblemsForm.Problem23;
begin
  { Save the contents of the memo to 'memo.txt' }
end;

procedure TProblemsForm.Problem24;
begin
  { Hide the form }
end;

procedure TProblemsForm.Problem25;
begin
  { Maxmimize the form }
end;

procedure TProblemsForm.Problem26;
begin
  { Use the ShowMessage procedure to display the content of the memo }
end;

procedure TProblemsForm.Problem27;
begin
  { Use the ShowMessage procedure to display the content of the memo }
end;

procedure TProblemsForm.Problem28;
begin
  { Move the form property Left to 0 and Top property to 0 }
end;

procedure TProblemsForm.Problem29;
begin
  { Change the Caption of the form to the content of the edit }
end;

procedure TProblemsForm.Problem30;
begin
  { Change the Caption of the form to the content of the edit }
end;

procedure TProblemsForm.Problem31;
begin
  { Set the Height of the edit to 150 }
end;

procedure TProblemsForm.Problem32;
begin
  { Set the input focus to the memo }
end;

procedure TProblemsForm.Problem33;
begin
  { Set the input focus to the memo }
end;

procedure TProblemsForm.Problem34;
begin
  { Add the content of the edit to the content of the edit }
end;

procedure TProblemsForm.Problem35;
begin
  { Use the LowerCase function to change all the items in the listbox to lower case }
end;

procedure TProblemsForm.Problem36;
begin
  { If the content of the memo is 'yes' the set checkbox state to checked }
end;

procedure TProblemsForm.Problem37;
begin
  { Make the edit disappear }
end;

procedure TProblemsForm.Problem38;
begin
  { Move the pair splitter to the top of the panel }
end;

procedure TProblemsForm.Problem39;
begin
  { Swap the content of the memo and listbox }
end;

procedure TProblemsForm.Problem40;
begin
  { Close the form }
end;
If you are unsure of how to solve some of the problems within this homework project you may want to refer to our prior recent projects or search for help using the documentation.

See also