Skip to main content

XI IT Programming Tasks

Hello again!
Its time to get the hang of writing meaningful programs. Try the following:
  1. Simple Calculator: Write a program in VB to mimick a simple business calculator, which has buttons for basic mathematical tasks (+, -, *, / and Square-root) and a text box to allow the user to input the numbers which need to be operated upon and the result thereof.
  2. A Basic Paint Tool: Write a program which allows the user to do the basic paint & draw operations on the form. (Each operation will be run/selected by clicking on the corresponding button)
    • Choose radius using a scrollbar and hence draw a circle (using Circle command) at the point where user clicks the mouse
    • Draw a square of fixed size (using Line command) from the point where the user clicks the mouse
    • Draw an arbitrary shape using the mouse as a pen.
  3. A crypting engine: Write a program which takes an input text from the user and then encodes it in the following way (Caeser code): A-01, B-02, C-03, D-04 ... Z-26; so ABHINAV will look like 01020809130122
  4. A Bouncing Ball: Write a program to simulate a ball bouncing as if it is confined to the boundaries of the form, i.e. when it reaches the edges of the form it reflects according to the laws of momentum conservation (i.e. angle of incidence = angle of reflection). To make the ball move, you may draw a filled circle and redraw it with background color OR you may use a image of a sphere as a ball and move it using the 'top' and 'left' properties. To judge if the ball has reached the edge you should know the pixel boundaries of your form, i.e. if it is 1000 x 1000 or 3000 x 500, etc. (for this use the width property of the form object)
  5. Generate Pascal's Triangle: Write a program to generate Pascal's triangle on the form. It is the arrangement of coefficients of a binomial expansion. (see the description and second diagram on wikipedia at http://en.wikipedia.org/wiki/Pascal%27s_triangle) You may limit the rows of the triangle to be up to 6.
  6. Addition of Matrices: Write a program which will add two 3 x 3 matrices whose elements should be taken as inputs in 2 sets of 9 text boxes. (each set arranged like a matrix) Can you upgrade this program (ignore the form) to deal with a larger matrix?

Comments

All Time Popular Posts

Annual Day 2023

 After a long hiatus due to covid we finally got most activities on track. The Annual Day function is always a big deal for everyone at Abhinav. It has been a tradition my mother started that the Annual Day will be not a Teacher-managed event, but a Student Initiative. Since when I was a teenager, I was part of this and today 10 years after she passed, I still strive to make it work as she would have. After some hesitation, we began working in early January. I wanted to use an outside choreographer just so that teachers will not be burdened. (They are already struggling with post-covid learning difficulties) But then, an outside guy could never do justice to the Abhinav style of doing things. We always keep in mind that the cultural program should be enjoyable to everyone in the audience and at the same time should display as many of the diverse talents that our students have, as possible.  It was a great relief that my G3 students came to the rescue. Almost all of std 9 and m...

Trapping events - IT assignment for Std XI

Perform these tasks on your PC and give yor answers as comments to this post or as an email to my ID - director@abhinav.ac.in . What is the sequence for the events given below and when do they occur for the given object? a) Textbox - Change, KeyPress, KeyDown, Validate b) Command button - Click, GotFocus, LostFocus, KeyPress c) Combo Box - Change, Click, DblClick, DropDown, Scroll Draw an equilateral triangle (should actually look like it) whose one vertex is the point at which the user clicks on the form. Make a simple calculator which has buttons for different numbers & operations (+, -, *, /, ^) and a box to display the result of each operation as well as each number being typed.

Expression Calculator in Java

Std X CA students: Here is another assignment to be finished before Thursday 24th Apr, 2014, 8 am. Reverse engineer the application I have posted at the FB group - Expression Caculator . i.e. 1. download the file and save in the root of c-drive 2. run it in command prompt using "java -jar c:\exprcalc.jar" 3. enter various expressions to compute like 2 + 3 = (then enter) 4. once you type '=' and a white space and enter, it displays the result. 5. You can take a long expression like 7.5562 / 7.889 + 5 - 12.67 = (then enter) 6. You can type another expression after the result for the previous is shown. 7. It also handles errors well. Figure out the code and paste your answers here as a comment. Hint: It uses a blank for loop ... i.e. for (;;) { here goes the code }to repeat taking many numbers one after the other.