A.Objective: Practice my programming skills for the final. 1)Programming Challenge from Chapter 6
B.Program:
My program
C.Comment:
I was successful in writing a program that takes from the user, the wholesale cost of an item and its markup percentage and calculate the retail cost of the item. It was basically a review on functions. I had to do some error checking and did have quite a few syntax errors that were solved easily.
Monday, April 30, 2007
Monday, April 9, 2007
April 10th
A. Objective: Write code in C++, very simple code that doesn't add to my already painful headache
B. My Program:
Visual Only: Hehehe-click here
C. I suceeded! My headache didn't get worse and I used C++ syntax.
B. My Program:
Visual Only: Hehehe-click here
C. I suceeded! My headache didn't get worse and I used C++ syntax.
Wednesday, April 4, 2007
April 5th
A.Objective: To write a simple program that actually has some kind of worth using my limited knowledge of C++.
B.Program
Take a gander right here:
.h file
.cpp file
C. Update: Chatted with Prof Coyle and I think I figured out my problem, I was doing integer division, so it was messing up my answer.
So, I was very proud of myself for writing a program that worked, until I discovered a problem in it. I'm so annoyed, I thought it was working correctly until I tested it out again before posting. The point of the program is to convert temperatures from celsius to fahrenheit and vice-a-versa. Well the conversion from celsius (C)to fahrenheit(F) works, but the fahrenheit to celsius doesn't. The only one that work for F to C is when I put in 32F and get 0C. Everytime I enter a degree in F, I get 0 C as the answer. Can someone help me figure out the problem as I have triple checked my formula and made all the changes I could think of and I can't figure it out.
B.Program
Take a gander right here:
.h file
.cpp file
C. Update: Chatted with Prof Coyle and I think I figured out my problem, I was doing integer division, so it was messing up my answer.
So, I was very proud of myself for writing a program that worked, until I discovered a problem in it. I'm so annoyed, I thought it was working correctly until I tested it out again before posting. The point of the program is to convert temperatures from celsius to fahrenheit and vice-a-versa. Well the conversion from celsius (C)to fahrenheit(F) works, but the fahrenheit to celsius doesn't. The only one that work for F to C is when I put in 32F and get 0C. Everytime I enter a degree in F, I get 0 C as the answer. Can someone help me figure out the problem as I have triple checked my formula and made all the changes I could think of and I can't figure it out.
Monday, April 2, 2007
April 3rd
A.Objective: Learn more about pure virtual functions for the test.
B.Program:
My .h files:
Student.h
EngStudent.h
All-in-One, i.e. output included
My .cpp files:
EngStudent.cpp
C.Comment:
This program from the book helped me to understand pure virtual functions better. I now know the syntax and why they are used. The base class in which the pure virtual function is declared can never be instantiated. I hope this will help me on the test.
B.Program:
My .h files:
Student.h
EngStudent.h
All-in-One, i.e. output included
My .cpp files:
EngStudent.cpp
C.Comment:
This program from the book helped me to understand pure virtual functions better. I now know the syntax and why they are used. The base class in which the pure virtual function is declared can never be instantiated. I hope this will help me on the test.
Subscribe to:
Comments (Atom)