Question: HCLTech | Recent Online Assessment 2026 | Java Data Encryption | Method Overloading |Latest HCLTech Placement Questions 2026 | Blood Relations & Data Sufficiency
0
Entering edit mode

Section 1: Coding Question

Question: Java: Data Encryption

Problem Statement: Customize a class called DataEncryption with the attributes encryptionRatio, baseEncryptionValue, and a method named encryptValue().

Implement three versions of the encryptValue() method in the DataEncryption class:

  1. Default Version: Takes no parameters and calculates the encrypted value as baseEncryptionValue + encryptionRatio
  2. First Overloaded Version: Accepts an integer encryptionAdjustment and calculates the encrypted value as (baseEncryptionValue + encryptionRatio) - encryptionAdjustment
  3. Second Overloaded Version: Accepts a string encryptionAdjustment, converts it to an integer, and calculates the encrypted value as (baseEncryptionValue + encryptionRatio) - encryptionAdjustment

Example: encryptionRatio = 50 baseEncryptionValue = 200 encryptionAdjustment = 14

  • Default, encryptedValue = 250
  • With the first method modification, encryptedValue = 236
  • With the second method modification, encryptedValue = 236

(Your task is to write the complete Java class implementation to pass all test cases based on these requirements).


Section 2: Verbal Reasoning (Section I)

Question 1: Blood Relations

E4 is the grandmother of F4. G4 is the sister of F4. How is E4 related to G4?

  • A. Grand daughter
  • B. Grandmother
  • C. Sister in law
  • D. Mother in law

Question 2: Blood Relations

R3 is the nephew of S3. T3 is the father of R3. How is T3 related to S3?

  • A. Brother
  • B. Uncle
  • C. Father
  • D. Cousin

Question 3: Data Sufficiency

The question given below is followed by two statements numbered I and II. Determine if the statements are, individually or together, sufficient to answer the question.

Question: What is the total number of students in a class?

Statements: I. If 5 more students join, the class will have 40 students. II. The number of students is a multiple of 5.

Options:

  • A. Both statements together are sufficient.
  • B. Statement I alone is sufficient.
  • C. Statement II alone is sufficient.
  • D. None of the statements alone or together are sufficient to answer the question.
ADD COMMENTlink 8 hours ago Sarthak • 0

Login before adding your answer.

Similar Posts
Loading Similar Posts