Skip to content

ishubhamparmar/MiniProjectsJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

MiniProjectsJava

  1. InsertUniqueVolumeBoxes.java Topic: Collection Framework: Set interface, Hashset. Insert the box details into the set. Create a box class and its attributes are length breadth and height (Double Type). Get the box details from the user and insert into the set. We need to store the details of the boxes with different volumes when the volume of the box is the same as the volume of previous boxes included don't add this box in the set. The boxes are called same when their volumes are equal.

Link: https://github.com/ishubhamparmar/MiniProjectJava/blob/main/InsertUniqueVolumeBoxes.java

  1. UserRegistration.java

Topic: Exception Handling: Create custom exceptions. A student portal provides user to register their profile, during registration the system needs to validate the user should be located in India. If not the system should throw an exception.

step 1: Create a user defined exception class InvalidCountryException

step 2: Create a main class UserRegistration and following method registerUser() the parameters are String userName and String userCountry

step 3: Logic inside the methods

    (i) If userCountry is not India throw a InvalidCountryException with the
    Message "User outside India cannot be registered".

    (ii) If userCountry is India print the message "User Registration successful"

Link: https://github.com/ishubhamparmar/MiniProjectJava/blob/main/UserRegistration.java

Hi, I'm Shubham Parmar! 👋

🚀 About Me

I'm a pre-final year Computer Science Engineering undergrad @ RGPV Bhopal. Currently Polishing DSA, Problem Solving and Web Development Skills.

🛠 Skills

Java, Javascript, HTML, CSS...

🔗 Links

linkedin twitter

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages