12,747,078 members (30,107 online)
Rate this:
See more:
Question 2 (45 Marks)
This question is based on Block III – Unit 1 (Graphical User Interfaces) and Block III – Unit 2 (Designing Interfaces). It is intended to test your ability to work with Boralnd’s IDE to develop a simple application and make use of the IDE’s help system.
Write a C++ code to implement the following application. Make sure to define all variables that you will use:
We have three edit boxes, three buttons, and two combo boxes. Enter two integer numbers in the start and end edit boxes respectively. The two entered values represent the starting and ending values of a series respectively. Negative values are not allowed and the starting value must be greater or equal to the end value, otherwise the calculation will not take place and the result will always be zero.
3
How combo boxes should work?
1. The first combo box consists of two options: Total for adding numbers and Average for finding the average of numbers. The initial value for the combo box is Total.
2. The second combo box consists of three options: AllExcept3 which taking into account all the series numbers except all of multiple 3 numbers (exclude 3,6,9,…), the First5 which taking into account the first five numbers in the series, and the Last5 which taking into account the last numbers in the series. The initial value for the combo box is AllExcept3.
If you choose Total from the first combo box and AllExcept3 from the second edit box then your decision is to add all the series numbers except all of multiple of 3 numbers in the series.
If you choose Total from the first combo box and First5 from the second edit box then your decision is to add only the first 5 numbers in the series.
If you choose Total from the first combo box and Last5 from the second edit box then your decision is to add only the last 5 numbers in the series.
The same previous scenario will be applied if the choice was for Average instead of Total.
 If you press on “Execute” button or if you use the short cut by pressing Alt key + x, the result will be printed in the third edit box (Output) and the focus will be on the start edit box.
 If you press on “Clear” button or if you use the short cut by pressing Alt key + C, all edit boxes will be cleared and the focus will be on the start edit box.
 If you press on “Exit” button or if you use the short cut by pressing Alt key + E, the application will be closed.
The initial design is shown as below and you should make sure to follow the same design given to you.

plzzzzzzzz help only with the part of combo boxes and the calculation related to it!!
Posted 2-Dec-12 16:29pm
Updated 2-Dec-12 17:57pm
v3
pwasser 2-Dec-12 22:18pm

Is this a joke?
Abhinav S 2-Dec-12 23:04pm

Homework.
Krunal Rohit 2-Dec-12 23:41pm

We've never done our homework.. Lol !!

Rate this:

## Solution 1

tala2005 wrote:
It is intended to test your ability ...
That means you, not anyone else.
GeekBond 5-Dec-12 14:03pm

Exactly what I was going to point out when reading the question. :)
Rate this:

## Solution 2

We didn't attend the lessons and we don't have access to the material that this homework refers to. Nor do we see the illustrations that apparently were provided with the homework.

Most importantly, we can not look into your head: the point of the homework is to provide you with an exercise that lets you train and understand the principles you have been tought. We cannot help you train without knowing what you do or do not understand. The only way to help you requires that you start out, step by step, to try and complete this homework, until you get stuck. At that point - and no earlier - tell us what you've done, and where you're stuck. Then, and only then, will we be able to help you.

It isn't really hard: just follow the instructions sentence by sentence, step by step. They're quite clear. Don't try to read and understand all at once if you feel overwhelmed by that much information. When you plan to eat an elephant, trying to swallow it whole won't work. Take just one bite at a time.
Rate this:

## Solution 3

Here's a solution I saw on Slashdot that I think you should turn in. It is very optimized for this maze of a problem you are trying to solve.

`10 PRINT CHR\$ (205.5 + RND (1)); : GOTO 10`

Top Experts
Last 24hrsThis month
 Dave Kreskowiak 188 OriginalGriff 155 ppolymorphe 127 Graeme_Grant 95 Maciej Los 85
 OriginalGriff 3,648 Peter Leow 2,751 ppolymorphe 1,973 Karthik Bangalore 1,700 Richard MacCutchan 1,329