logo
HomeExploreAppsAddBETAFlashcardsBETAQuizzesBETAChatBETALecturesMy profile
PremiumContact usPrivacy and terms
logo
LoginSignupPricing
  1. Home
  2. /
  3. Quizzes
  4. /
  5. University of Mpumalanga
  6. /
  7. Apd201
  8. /
  9. Apd201 - Application Development 2A (Java) - QUIZ

Apd201 - Application Development 2A (Java) - QUIZ

Apd201 · Application Development 2A (Java)

University of Mpumalanga

Questions
10 Questions

Practice 10 questions on Apd201 - Application Development 2A (Java) at University of Mpumalanga. Free AI-generated quiz on uNotes — track your score, retake anytime.

Take this quizView course

Questions

  1. 1According to the Fraction class specification, which pre-processor directives should be used to prevent multiple declarations of the class?
  • 2What are the initial values assigned to the numerator and denominator by the default constructor?
  • 3Which members of the Fraction class are defined as private?
  • 4What is the return type of the calculateFloat() method?
  • 5If a Fraction object has a numerator of 5 and a denominator of 10, what value will calculateFloat() return?
  • 6In the front-end program (Main), how many Fraction objects must be declared?
  • 7Which methods in the Fraction class are responsible for retrieving the values of the private data members?
  • 8What is the primary purpose of the setValues(int, int) method in this class?
  • 9Based on the provided output screen, if Fraction 1 is 5/10 and Fraction 2 is 1/4, what is the displayed result of their sum?
  • 10Why are the numerator and denominator members marked as 'Private'?
  • You might also like

    LHF101 - Historical Foundations of Law - QUIZ

    LHF101
    University of Mpumalanga
    25 Questions

    BIO11 - Biology - QUIZ

    BIO11
    University of N/A
    40 Questions

    GCSEBIOLOGY - GCSE Biology - QUIZ

    GCSEBIOLOGY
    GCSE
    20 Questions

    IEP115C - Industrial Engineering Practice - QUIZ

    IEP115C
    Tshwane University of Technology
    31 Questions