Search:

Type: Posts; User: ixjaybeexi

Search: Search took 0.20 seconds.

  1. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    Ok, so here's my code:


    public static int attendence (int lecturesAttended){
    if lecturesAttended <= 5 {
    int points = 2 * lecturesAttended;
    }
    else {
    points = 5 + lecturesAttended;
    }
  2. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    OH, wow alright I think I get it now, haha, that was a lot simpler than I thought, and then I just return points back into my main..
  3. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    :confused: Ya lost me, I'm kinda confused now.
  4. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    Alright so basically, it should be

    -if lectures <= 5, points = lectures * 2 + 5
    -else lectures > 5, points = lectures * 1

    Is it possible to do like points = points + points? That just...
  5. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    Hmm, alright.
    Could I use this algorithm?

    1) In terms of n, for each lecture attended, student gets 2 points for the first 5 and 1 for there after
    -If lecturesAttended > 5, points =...
  6. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    that's why i'm asking you guys hahaha, i don't know how to answer the question. i could use if/else if you could teach me how to do it...?
  7. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    I have no idea what your pseudo code means...we didn't learn how to do if and else statements yet
  8. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    Well what I have so far is this


    public class Lab6 {
    public static void main (String[] args){
    System.out.println("The amount of points received are " + attendence(7));
    ...
  9. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    can anyone help me?
  10. Replies
    25
    Views
    4,142

    Re: Need help creating this program

    we don't have to have the user input the amount of lectures attended, we just have to make up a number, and in my case it's 7. i know he's supposed to get 12 points, i just don't know the math...
  11. Replies
    25
    Views
    4,142

    Need help creating this program

    K, so I have to convert this problem into a method:

    5) Write a method named attendance that accepts a number of lectures attended by a student, and returns how many points a student receives for...
Results 1 to 11 of 11