Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

What happens?

  • 10-05-2008 7:41pm
    #1
    Closed Accounts Posts: 75 ✭✭


    class Cut
    {

    private int u = 3;
    private double d = 4.5;

    Cut(int u0,double d0) {u= u0;d= d0;}

    Cut(double d0) {d= d0;}


    lets say then in the main body this is supplied

    p = new Cut(10,3.14);


    its on a past exam paper im doin
    any help would b great


Comments

  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    what do you think happens?

    show an attempt and we can tell you if you're right or wrong


  • Registered Users, Registered Users 2 Posts: 1,322 ✭✭✭Mad_Max


    are you asked to state what condition the variables will be in at that point?

    As the post before says post your attempt and the full question with it and we can get a better idea.


  • Registered Users, Registered Users 2 Posts: 2,567 ✭✭✭daveharnett


    Unless there's some trick to the question that i've missed....
    The command will create a new Cut object called p, in which u=10 and d = 13.4


  • Registered Users, Registered Users 2 Posts: 1,922 ✭✭✭fergalr


    The command will create a new Cut object called p, in which u=10 and d = 13.4
    The above has a minor typo/mistake in it, in case the OP is looking at this and getting more confused.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    I suppose to work it out OP you'll need to read up on Classes and Class contructors. You might also have a read of this with regards to problem solving.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,620 ✭✭✭Grudaire


    It's too late for him now, I think that exams just gone:D


Advertisement