1. Engineering
  2. Computer Science
  3. the program is in c and the letter that has...

Question: the program is in c and the letter that has...

Question details

The program is in C++ and the letter that has to be done is "P"

Program 1:

  • Files:
    • lab1-p1-letterTest.c
      • A main program that uses your graphical letters library and tests your function by drawing it in several different sizes, colors, and locations in the graphics window
        • minimum: at least 4 copies of your letter in at least 3 different sizes and 2 different colors
        • max grade: use a loop to draw many copies of your letter or symbol in a sequence of different positions/sizes/colors
  • lab1-p1-letterLib.c
    • your graphical letter library
      • (similar to the shapesLib.c library of shape functiosn that we made in class)
  • lab1-p1-letterLib.h
    • header file for you graphical letters library


  • Each student will be assigned a letter of the alphabet or other symbol (digit, punctuation).
  • Write a function that draws your letter, similar to the drawCircle and drawSquare functions we did in class.

Your function should be named exactly  drawCharX, where X is replaced with your letter or digit.

  • (if you have symbole assigned write out the name of the symbol, such asdrawCharEquals)

Your function needs 3 parameters:

    • ulCornerX, ulCornerY  
      • -- the x,y coordinates of the upper left corner of the area where your letter will be printed
  • height
    • the height, in pixels that the letter should be drawn
    • note: that each letter or symbol should have a width that is exactly 3/4ths the height
      • your function will calculate the width (it should not be a parameter)
  • Your function does not need to return a value (void return type)
  • Your function should draw a letter in an "outline" style, similar to


  • All letters should have width = 3/4 height.
  • You may use "squared off" versions
  • of curvy/circular letters
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution