Thread: Degree

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    1
    Rep Power
    0

    Exclamation Degree


    I have to write methods to check what degree a student gets - first, second, no degree etc (which are declared in an enum class).

    Also, I have a static class and have to write methods in this class. I have a list of two integers as parameters e.g.
    public static DegClassify classification(List<Integer> Level5, List<Integer> Level6){/*.....methods here.....*/}
    //level 5 : year 2 and level 6: year 3
    //total number of credit each year 30

    methods should give me :
    1. breaking down modules into chunks
    e.g. if user input is
    L5: 50 40 56 41 (all 30 credit modules)
    L6: 72, 65, 62, 52

    method to break them down:
    L5 becomes: 50, 50, 40, 40, 56, 56, 41, 41 and same for L6

    2. the worst mark should be removed from this:
    get : 50, 50, 40, 40, 56, 56, 41

    3. calculate average
    L5: 50+ 50+40+ 56+ 56+ 41+41 = sum / 7 = e.g. 69
    L5: 55+ 55+45+45+ 60+ 60+ 41 = sum / 7 = e.g. 70

    4.average for degree
    69 +70+70+70 = 69.74 (because L6 is triple weighted)

    therefore 2nd class.

    So, far I have done this
    -----------------------------------
    output:
    How many modules?
    2
    Please enter marks for module:
    5
    Please enter marks for module:
    5
    These are the marks you have entered:
    5 5

    ------------------------
    And finding the worst number, but don't know how to get rid of this. Also, done doubling an element in an array.
    //array[i] = array[i] *2;

    I would really appreciate. I am trying this for days, and hours and hours.. thanks
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,724
    Rep Power
    348
    Please post your code and ask some specific questions about the problems you are having. Be sure to wrap the code in code tags.

IMN logo majestic logo threadwatch logo seochat tools logo