Skip to content

Java practice#3

Open
Kruna1Pate1 wants to merge 1 commit intodevelopfrom
feature/java-practice
Open

Java practice#3
Kruna1Pate1 wants to merge 1 commit intodevelopfrom
feature/java-practice

Conversation

@Kruna1Pate1
Copy link
Copy Markdown
Owner

@Kruna1Pate1 Kruna1Pate1 commented Mar 23, 2023

Java

  • Class & Object
  • Abstract class, Inheritance
  • Operators
  • Method
  • Constructor
  • OOP concepts (Inheritance, Polymorphism, Abstraction, Encapsulation)
  • Control flow loops
  • Decision Condition
  • Access control
  • Lambda
  • Collection
  • Error Handling
  • Enum
  • Serializable deserializable
  • Bits occupied by data type

Summary by Simform OpenAI 1.0.2

Release Notes:

  • New Feature: Several Java classes were added to demonstrate various concepts such as collections, conditionals, enums, exception handling, lambdas, and object-oriented programming.
  • New Feature: A game was added that generates a random number and asks the user to guess it.

"Java code galore,
Concepts and games to explore,
Bugs beware, we implore,
Our code is now hardcore."

Summary by AIReviewRadar 1.0.2

Release Notes:

  • New Feature: Several Java classes were added to demonstrate various concepts such as collections, conditionals, enums, exception handling, lambdas, and object-oriented programming.
  • New Feature: A game was added that generates a random number and asks the user to guess it.

"Java code galore,
Concepts and games to explore,
Bugs beware, we implore,
Our code is now hardcore."

@Kruna1Pate1 Kruna1Pate1 requested a review from nishchal-v March 23, 2023 04:31
Copy link
Copy Markdown
Collaborator

@nishchal-v nishchal-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep a line after entity declarations
remove extra lines

Comment thread Demo/app/src/main/java/com/krunal/demo/javaPractice/CollectionsDemo.java Outdated
@Kruna1Pate1
Copy link
Copy Markdown
Owner Author

Keep a line after entity declarations remove extra lines

Fixed

@purvesh-d purvesh-d closed this Apr 5, 2023
@purvesh-d purvesh-d reopened this Apr 5, 2023
@Kruna1Pate1 Kruna1Pate1 force-pushed the feature/java-practice branch from 256819b to cffdcef Compare April 10, 2023 04:21
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2023

🤖 OpenAI

Thank you for letting me participate in the code review. Overall, this pull request adds several Java classes that demonstrate various concepts such as collections, conditionals, enums, exception handling, lambdas, and object-oriented programming. It also includes a game that generates a random number and asks the user to guess it. The changes appear to be well-documented and follow best practices.

Below is a table summarizing each file:

File Summary
CollectionsDemo.java Demonstrates the use of various collection types such as List, Map, and Set.
Conditions.java Demonstrates the use of if-else and switch statements to check for vowels.
DifferentObjCreation.java Creates objects of Demo2 class using different methods like new, Class.forName(), clone() and ObjectInputStream.
DummyPackage.java Adds a new Java class DummyPackage in a non-existent package with a constructor that prints a message.
Enums.java Demonstrates the use of enums in Java. Defines an enum Signal and its internal implementation SignalClass.
ExceptionHandling.java Demonstrates exception handling, try-with-resources, and singleton pattern. Defines three custom exceptions: UserNotFoundException, InvalidPasswordException, and EmptyPasswordException.
Lambda.java Examples of lambda expressions, functional interfaces, and method references.
NumGuessGame.java Generates a random number and asks the user to guess it. Tells the user if their guess is too high or too low, and how many tries it took to guess the correct number.
OopDemo.java Defines an interface Animal and three classes: OopDemo, Domestic, Dog, and Lion. Creates instances of Animal and its subclasses, and calls their methods.
Operators.java Methods for arithmetic, relational, logical, assignment, and ternary operators. Includes an example of the instanceof operator and round-off error handling.

Chat with 🤖 Simform OpenAI Bot (@openai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @openai in a reply.

🤖 OpenAI
  <details>
Files not reviewed due to max files limit (5)

Not reviewed

  • Demo/app/src/main/java/com/krunal/demo/javaPractice/ExceptionHandling.java
  • Demo/app/src/main/java/com/krunal/demo/javaPractice/Lambda.java
  • Demo/app/src/main/java/com/krunal/demo/javaPractice/NumGuessGame.java
  • Demo/app/src/main/java/com/krunal/demo/javaPractice/OopDemo.java
  • Demo/app/src/main/java/com/krunal/demo/javaPractice/Operators.java

@Kruna1Pate1
Copy link
Copy Markdown
Owner Author

@nishchal-v Can you merge the PR

Class & Object
Abstract class, Inheritance
Operators
Method
Constructor
OOP concepts (Inheritance, Polymorphism, Abstraction, Encapsulation)
Control flow loops
Decision Condition

Java practice

Fix line breaks
@Kruna1Pate1 Kruna1Pate1 force-pushed the feature/java-practice branch from cffdcef to ec51217 Compare May 1, 2023 05:17
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 1, 2023

🤖 AIReviewRadar

Thank you for letting me participate in the code review.

This pull request adds several Java classes to demonstrate various concepts such as collections, conditionals, enums, exception handling, lambdas, and object-oriented programming. It also includes a number guessing game that generates a random number and asks the user to guess it. The changes appear to be well-documented and follow best practices. Overall, this is a comprehensive update that enhances the functionality of the project.


Chat with 🤖 AIReviewRadar (@openai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @openai in a reply.

public String speak() {
return "Roar";
}
}
Copy link
Copy Markdown

@github-actions github-actions bot May 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

  1. The file name and package name should be in lower case.
  2. There is no need to import DummyPackage as it does not exist.
  3. In the Animal interface, the speak() method should not print anything to the console. It should only return a string.
  4. In the Domestic abstract class, the getName() method should have an access modifier (e.g. public).
  5. In the Dog class, the setName() method should have an access modifier (e.g. public).

Please make these changes and update the pull request.

Reply with "OK" if you have any questions or need further assistance.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AIReviewRadar

@Yuvaizo72: Thank you for acknowledging the requested changes. Please make the following changes to the code:

  1. Change the file name and package name to lowercase.
  2. Remove the import statement for DummyPackage.
  3. In the Animal interface, remove the System.out.println("Default method"); line from the speak() method.
  4. In the Domestic abstract class, add the access modifier public to the getName() method.
  5. In the Dog class, add the access modifier public to the setName() method.

Please let me know if you have any questions or need further assistance.

Repository owner deleted a comment from Yuvaizo72 May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants