Click here to Skip to main content
11,411,840 members (51,381 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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
Edited 2-Dec-12 17:57pm
v3
Comments
pwasser at 2-Dec-12 22:18pm
   
Is this a joke?
Abhinav S at 2-Dec-12 23:04pm
   
Homework.
Krunal Rohit at 2-Dec-12 23:41pm
   
We've never done our homework.. Lol !!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

tala2005 wrote:
It is intended to test your ability ...
That means you, not anyone else.
  Permalink  
Comments
GeekBond at 5-Dec-12 14:03pm
   
Exactly what I was going to point out when reading the question. :)
Rate this: bad
good
Please Sign up or sign in to vote.

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

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
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 213
1 Sergey Alexandrovich Kryukov 200
2 ProgramFOX 130
3 Sascha Lefévre 120
4 Dave Kreskowiak 90
0 Sergey Alexandrovich Kryukov 8,920
1 OriginalGriff 7,128
2 Maciej Los 3,440
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web02 | 2.8.150414.5 | Last Updated 3 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100