SOLO 03 Problems


================================
0139:

The program uses no functions at all (except main). (-10)

According to the test script, the program incorrectly writes
"100.000" when purporting to write 100.5293419 with three
digits after the decimal point.  When I tested the actual
program, I was not able to reproduce this error.

The program appears to be using the wrong formula for the
interest -- looks like simple interest instead of compound
interest as specified.  The program is not getting the right
answers. (-10)

Total Score: 80/100

================================
1200:

No problems.
          
Total Score: 100/100

================================
1292:

No problems.

Total Score: 100/100

================================
1679:

OK except the program does not output a '$' preceding amounts
of money. (-4)

Total Score: 96/100

================================
2279:

No problems.

Total Score: 100/100

================================
2904:

OK except the program prints the interest rate in the wrong
format: i.e. 0.092% is printed instead of 9.250%.  This is more
serious than a mere formatting error, because the value of the
interest rate is really incorrect: 0.0925% is *not* equal to
9.25% (-7).

Total Score: 93/100

================================
3138: 

The code is not indented properly.  (-10) Do it like this:

int main()
{
  int intro();
  float principal();
  float percent();
  (etc)
)

not like this:
 > 
 > int main()
 > {
 > int intro();
 > float principal();
 > float percent();
 > (etc)
 > }
 > 

The code is missing the directive:

setiosflags(ios::showpoint)

This means some of the digits desired after the decimal point
may not be displayed.  Also the program issues the formatting
directives too late to affect anything except the last output
-- the principal plus interest.  The consequence is that the
program is not formatting the principal or the interest
correctly.  Correct formatting was one of the main objectives
of this assignment. (-15)

Total Score: 75/100

================================
4391:

No problems.

Total Score: 100/100

================================
4407:

No problems.

Total Score: 100/100

================================
4653:

No problems.

Total Score: 100/100

================================
4931:

No problems.

Total Score: 100/100

================================
5210:

Program requires the user to enter the interest rate contrary
to the way specified, e.g. 0.02 instead of 2 for two percent.
The program also incorrectly writes the interest rate back out
in this form. (-10)

There is nothing in the program to stipulate the number of
digits to use after the decimal point when printing the
principal or the interest rate.  Correct formatting was one of
the main objectives of this assignment.  (-25)
	
One copy of the script was sent with a subject line identifying
it as source.  The actual copy of the source I received
contains "garbage characters."  This makes it especially
difficult for me to read and test the source code.

The code is not indented properly.  (-10) Do it like this:

int main()
{
  int intro();
  float principal();
  float percent();
  (etc)
)

not like this:

 > int main()
 > {
 > int intro();
 > float principal();
 > float percent();
 > (etc)
 > }
 > 

Total Score: 55/100

================================
5265:

The program asks the user to enter the interest rate in a
manner that violates the specifications: For example the
program asks the user to enter 0.1 when the user should enter
10, meaning ten percent.  The program also incorrectly writes
the interest rate back out in this form. (-10)

The program outputs the interest rate with only two digits
after the decimal point, instead of three. (-5)

Total Score:  85/100

================================
5438:

The script was sent with a subject line identifying it as
source.

The program does not print the interest rate with the correct
number of digits after the decimal point.  The program does not
contain the manipulator:

setiosflags(ios::showpoint |ios::fixed)

which would assure that all digits of precision would be shown
and that the output would be in fixed-point, rather than in
scientific notation.  The only setprecision manipultator in the
program has the form setprecision(5) instead of setprecision(2)
or setprecision(3) , which are the ones needed in this
program.  Correct formatting was one of the main objectives of
this assignment. (-20)

Total Score: 80/100

================================
5669:

No problems.

Total Score: 100/100

================================
6105:

No problems.

Total Score: 100/100

================================
6663:

No problems.

Total Score: 100/100

================================
7122:

The user must enter the interest rate contrary to the way
specified, i.e. .02 instead of 2 for two percent.  The program
also incorrectly writes the interest rate back out in this
form.  It also writes a percent sign after this figure.  The
figure is *not* a percent, and so the output is very
misleading. (-10)

The ouput prints principal plus interest and claims that amount
is just the interest.  This too is very misleading.

The program formats the interest with only two digits after the
decimal point instead of the three specified.  (-5)

Total Score: 85/100

================================
7944:

I received an empty message instead of a script.  (-20) The
program compiles and runs OK on some inputs.

Total Score: 80/100

================================
8754:

Don't use global variables (-5):
 > 
 > #include <iostream.h>
 > #include <math.h>
 > #include <iomanip.h>
 > 
 > float principal;                   //principal
 > float rate;                        //interest rate
 > int years;                         //years
 > float interest;                    //interest collected
 > 

Also, the output of the answer is formatted all as one line, so
it lacks intelligibility. (-3)

Total Score: 92/100

================================
8784:

No Problems.

Total Score: 100/100

================================
9009:

This function should not be an "int" function:

 > int instructions(void);

It should be:

void instructions(void);

 > 
 > Please enter the amount of the principal
 > in decimal form. 325.89 is one example.
 > Do not precede the amount with a dollar
 > sign ($) and do notinclude any commas
 > in your number:........................       50
 > 
 > Please enter the percent interest rate
 > in decimal form. 9.25 is one example.
 > Do not include a percent sign(%)
 > in your number:......................        4.25
 > 

The program does not divide 4.25 by 100. In effect, the formula
for the interest is wrong.  (-10)

 > Please enter the number of years:  1
 > 
 > your answer:
 > 50will grow to 262.5after 1years
                  ^^^^ Therefore this answer is way too large.

This output is hard to read.  The numbers are not formatted
according to specifications, and the use of white space is not
good.  The program does not have any manipulators such as
setiosflags(ios::showpoint | ios::fixed) or
setprecision(2).  (-25)

 > earning interest at a rate of 4.25percent
 >

Total Score: 65/100

================================