Thread: Homework Help jumped from C to this in 1 week

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    24

    Homework Help jumped from C to this in 1 week

    I need to create a C++ program that looks like this and I need some help on where to start I am taking an internet course on C programming and we are near the end of the semester and we started on C++ and the book sucks I was sick and am behind but this is what we have to do. The circle diagram did not print out but I hope you get the point and can point me to a tutorial or give me some hints. I need this done by December 15.
    C++ Program – The Right Triangle Class


    [IMG]file:///C:/Users/Dustin/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif[/IMG]
    sin2 Θ+ cos2 Θ = 1
    Create the class, RtTriangle, that contains the following:

    • Variable attribute acuteAngle (identifiedas Θ indiagram)
    • Calculated variable attribute acuteAngle2 (which will be 90 - acuteAngle).
    • Calculated variables radAngle and radAngle2.
    • Methods getAngle, setAngle2, setRad, and reportTrigFunc.


    1. Write the code for the methods:

    · getAngle asks the user to enter (a new value of) the acuteAngle.
    This angle will be entered in degrees and must be within the range 0 <
    acuteAngle < 90
    Do not allow invalid values.

    · setAngle2 calculates second acute angle of the right triangle, acuteAngle2, (in degrees).
    · setRad, converts each acute angle from degrees to radians creating radAngle and radAngle2.
    Since 2 π = 360 degrees - the following conversion will be useful:
    Conversion: 1 degree = π / 180 radians

    · reportTrigFunc, calculates the cosine, sine and tangent of each acute angle and prints them to the screen for the user.


    1. Create a program to test the class RtTraingle.

  2. #2
    Registered User
    Join Date
    Oct 2010
    Posts
    45
    Start by making the class, since that is the entirety of your homework.

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Relevant. You missed the girlie nickname though.

  4. #4
    ...and never returned. StainedBlue's Avatar
    Join Date
    Aug 2009
    Posts
    168
    Find a book that doesn't suck?
    goto( comeFrom() );

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > I need this done by December 15.
    Then you have plenty of time to get some solid reading done, and start to try a few ideas out.

    I would suggest you post your first attempt at the weekend so we can see how you're getting on and push you in the right direction if need be.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User
    Join Date
    Oct 2011
    Posts
    24

    Thanks

    Thanks I will I am trying to get this done and two other assignments because I had the flu and this programming class is moving faster than any class I have had a program is due every week so I was out for 1 week and its like I missed two but I will try to get it done by this week end

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. HELP Homework Validating ISBN with dashes due next week
    By xxdustinxx in forum C Programming
    Replies: 2
    Last Post: 10-18-2011, 03:06 PM
  2. Help with day of the week program
    By Punkakitty in forum C++ Programming
    Replies: 10
    Last Post: 01-14-2009, 06:55 PM
  3. day of week
    By s_ny33 in forum C Programming
    Replies: 18
    Last Post: 11-02-2005, 11:56 AM
  4. e-week, networking, and a 96 hour week...
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 02-23-2003, 05:23 PM

Tags for this Thread