Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update class.md #62

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1c0ed3c
Git and Java
AbhilashG97 Sep 6, 2018
089746f
style: minor modifications
AbhilashG97 Oct 28, 2018
932c3c4
Merge pull request #25 from AbhilashG97/minorFixes
AbhilashG97 Oct 28, 2018
ae5ba4d
added files
AbhilashG97 Dec 11, 2018
2be9f4b
new fruit added
hridyakrishna Dec 11, 2018
f23b2f6
prabhakar
ajay-prabhakar Dec 11, 2018
46fb329
apple is added
Dec 11, 2018
74400c3
Changed the fruit name
jasnasuresh Dec 11, 2018
b003dee
changed the fruit name
gopikaharikumar Dec 11, 2018
7889312
added star-fruit
AbhilashG97 Dec 11, 2018
84a166f
Merge pull request #34 from AbhilashG97/fruitAdd
AbhilashG97 Dec 11, 2018
4d9d4bb
added fruits
abhijitramesh Dec 11, 2018
8998b5b
Merge pull request #28 from hsymphonyk/fruit
AbhilashG97 Dec 12, 2018
a129551
Merge pull request #35 from abhijitramesh/fruitbasket
AbhilashG97 Dec 12, 2018
2d89683
Merge pull request #30 from prabhakar369/hello
AbhilashG97 Dec 12, 2018
5b99654
Merge pull request #32 from gopikaharikumar/new
AbhilashG97 Dec 12, 2018
ebe4ae9
Merge pull request #33 from jasnasuresh/newb
AbhilashG97 Dec 12, 2018
24e45c5
Merge branch 'development' into fruits
AbhilashG97 Dec 12, 2018
beac945
Merge pull request #31 from athiranair2000/fruits
AbhilashG97 Dec 12, 2018
15d8646
created fruit juice
AbhilashG97 Dec 12, 2018
f392a62
Java Assignment: Beginner Assignment 1 :sparkles:
AbhilashG97 Apr 25, 2019
afc216c
Java: Simple Java Excercises
AbhilashG97 Apr 27, 2019
1bcb506
Create README.md
AbhilashG97 May 18, 2019
66bea76
adds student info
Santiag0-C Sep 13, 2023
6a12a90
adds school
Santiag0-C Sep 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.class
38 changes: 38 additions & 0 deletions Assignments/Advanced/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# test-repo
This is a test repo, please fork me!!! \(^_^)/
This repository contains a simple test on Java Lambdas and Git.
<hr>

Please follow the below mentioned instructions:

1. Fork this repository
2. Clone the forked the repository to your machine
3. Create a new branch from the development branch
4. Create a new folder :file_folder: and name it ```Java```
5. Go into the Java directory
6. Create a java file called Student
* Create a class Student
* Create the following fields and methods-
1. String -> name [private]
2. String -> rollNumber [private]
3. String -> favoriteFruit [private]
4. float -> height [private]
5. float -> weight [private]
* Create getters and setters for these fields
* Create a argumented-constructor which takes in all the declared fields, and a no-arg constructor(default constructor)
* Create a driver class which contains a main method.
* Create a non-static method called ```studentConsumer()``` in the driver class. The method takes two in arguments, which are as follows:
1. An ```ArrayList<T>``` of students
2. A ```Consumer<T>``` functional interface
* Inside the method body write the logic to consume the students in present in the ```ArrayList<T>```
by making use of the ```accept(T t)``` method of the ```Consumer<T>``` functional interface.
* Create an ArrayList of students and populate the list by taking input from the user.
* Call the ```studentConsumer()``` method inside the main thread, pass in the list of students and also write the logic to print the details of each student from the list.
* Once the program executes and displays the output, commit the file ```.java``` file only.
7. Now create a text file and write the name of your favorite fruit, song, and dessert.
8. Commit the text file as well.
9. Create a ```.gitignore``` file and add ```*.class``` entry into it.
10. Commit this file as well.
11. Finally, squash the last three commits into a single commit and send a pull request.

:sparkles: Yay!! You're done. :sparkles:
50 changes: 50 additions & 0 deletions Assignments/Easy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Beginner Java Assignment

## Task 1

Please do the following and send the files as a pull request -

1. Your task will be create a POJO.
1. Define two variables of any data type.
1. Initialize the variables through a parameterized constructor that takes in **both** the variables.
1. Create ```getter and setters``` for the two variables.
1. Override the ```toString()``` method of this class.

:sparkles: ```Bonus :``` Create a new class with a ```main()``` method, create objects of the above class and print the objects on the console.

## Task 2

Your task will be to simulate a **Grocery shop**.

1. Create a ```Fruit``` class and two subclasses of the ```Fruit``` class.
1. The ```Fruit``` class should contain the following variables -
1. fruitName of type ```String```
1. price of type ```float```
1. Create a parameterized constructor which takes in both the variables and then also a default non-parameterized constructor.
1. Override the ```toString()``` method.
1. Create getters and setters for all the variables.
1. Create a ```Vegetable``` class and two subclasses of the ```Vegetable``` class.
1. The ```Vegetable``` class should contain the following variables -
1. vegetableName of type ```String```
1. price of type ```float```
1. Create a parameterized constructor which takes in both the variables and then also a default non-parameterized constructor.
1. Override the ```toString()``` method.
1. Create getters and setters for all the variables.
1. Create a ```FruitAndVeggeShop``` class which contains the following variables -
1. ArrayList<Fruit>
1. ArrayList<Vegetable>
1. Create a parameterized constructor that takes in both the ArrayList's as arguments.
1. Create a method which prints all the fruits present in the ArrayList.
1. Create a method which prints all the vegetables present in the ArrayList.

:sparkles: **Bonus:** Print all the fruits present in the ArrayList using the forEach() method by making use of a method reference.

## Task 3

Complete the exercises present [here](https://www.hackerrank.com/domains/java)

Also try completing [this](https://www.hackerrank.com/domains/tutorials/30-days-of-code)

:sparkles: :sparkles:

<hr>
3 changes: 3 additions & 0 deletions Assignments/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Java Assignments

This folder will contain ```Java``` assignments. It will be updated soon with a lot more problems. :sparkles:
4 changes: 4 additions & 0 deletions class.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Santiago
Colorado
back end
rrcc