Skip to content

Commit

Permalink
quest 6
Browse files Browse the repository at this point in the history
  • Loading branch information
albinsabu2023 committed Oct 11, 2024
1 parent 7aeec6c commit 1b1af2d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [x] <a href="https://github.com/albinsabu2023/TCS-IPA-Practice/blob/main/quest2/qust2.txt"> q2.Employee class for findingTransport & secondHighest rating</a>
- [x] <a href="https://github.com/albinsabu2023/TCS-IPA-Practice/blob/main/quest3/Qust.txt">q3.Hotel available with wifi & in given month </a>
- [x] <a href="https://github.com/albinsabu2023/TCS-IPA-Practice/blob/main/quest4/quest.txt"> q4.Car class with passed test enviornment</a>
- [x]<a href="https://github.com/albinsabu2023/TCS-IPA-Practice/blob/main/quest5/question.md"> q5. SIM class to sort with balance and check circle </a>
- [x]<a href="https://github.com/albinsabu2023/TCS-IPA-Practice/blob/main/quest6/question.md"> q6. Cricket Player class to find avg by matches played </a>
- [x] <a href="https://github.com/albinsabu2023/TCS-IPA-Practice/blob/main/quest5/question.md"> q5. SIM class to sort with balance and check circle </a>
- [x] <a href="https://github.com/albinsabu2023/TCS-IPA-Practice/blob/main/quest6/question.md"> q6. Cricket Player class to find avg by matches played </a>


14 changes: 14 additions & 0 deletions quest6/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ public void setRuns(int runs) {

public class Main {
public static void main(String[] args) {
// manuallly you can read input using loop
/*
* List<Cricket> input=new ArrayList<>();
* Scanner sc=new Scanner(System.in);
* for (int i=0;i<4;i++){
* int a=sc.nextInt();
* String b=sc.nextLine();sc.nextInt();
* int c=sc.nextInt();
* int d=sc.nextInt();
* int e=sc.nextInt();
* Cricket c=new Cricket(a,b,c,d,e);
* input.add(c);
* }
*/
Cricket c1 = new Cricket(100, "Sachin", 5, 150, 13000);
Cricket c2 = new Cricket(101, "Sewag", 4, 120, 10000);
Cricket c3 = new Cricket(102, "Dhoni", 7, 110, 7000);
Expand Down
37 changes: 37 additions & 0 deletions quest6/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,48 @@ Finally, print grade.

## Test cases


ID Name Ranking MatchesPlayed Runs
100 Sachin 5 150 13000
101 Sehwag 4 120 10000
103 Dhoni 7 110 7000
104 Kohli 15 57 4400


### input

```
100
Sachin
5
150
13000
101
sehwag
4
120
10000
103
Dhoni
7
110
7000
104
kohli
15
57
4400
100
```

## output

```
grade A
grade A
grade B
```

0 comments on commit 1b1af2d

Please sign in to comment.