[go: up one dir, main page]

0% found this document useful (0 votes)
296 views2 pages

Cricket Matches Assignment

This document provides a problem statement and API description for a coding assignment to analyze cricket match data from a given API. The tasks are to return the highest single innings score with team name, and count the number of matches where the total score of both teams was over 300. The code is expected to call the API, perform the necessary computations, and print the results in the specified format. The submission will be evaluated based on producing the correct outputs for the given tasks.

Uploaded by

Md Ahsan Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
296 views2 pages

Cricket Matches Assignment

This document provides a problem statement and API description for a coding assignment to analyze cricket match data from a given API. The tasks are to return the highest single innings score with team name, and count the number of matches where the total score of both teams was over 300. The code is expected to call the API, perform the necessary computations, and print the results in the specified format. The submission will be evaluated based on producing the correct outputs for the given tasks.

Uploaded by

Md Ahsan Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Cricket Matches Assignment

Problem Statement
You will be given an api which contains a list of recent cricket matches with their data. The task
is to print a few key results from the given set of matches.

Api Description
Here is the api curl link

curl --location 'https://api.cuvora.com/car/partner/cricket-data' \


--header 'apiKey: test-creds@2320'

Above is a Get Http Rest Api which contains a list of matches with their data. Following fields in
the api with their meanings are:

"id": Unique Match Id,


"dateTimeGMT": Data Time ,
"matchType": Match Type like T20, ODI, Test Match,
"status": Match result Like Team A won by 10 runs",
"ms": Match Status (Result, Fixture, Ongoing), Result means Match result is obtained,
"t1": Team 1 name,
"t2": Team 2 name,
"t1s": Team 1 Score,
"t2s": Team 2 Score,
"t1img": Team 1 Image,
"t2img": Team 2 Image

Tasks
In the main java function. An api given above should be triggered to get JSON data of cricket
matches. Then do computations to get the following

1. Return Highest Score in one innings with the team name.


2. Return Number of matches with total 300 Plus score from both teams.

Print the above data in the console and return the message from the main function.
Highest Score : “Highest Score” and Team Name is : “Team Name”
Number Of Matches with total 300 Plus Score : “Number of Matches”

Text in “” should be fields computed from your code.

Result Criteria
Zip File of working code Should be sent.
All tasks should be done and give the correct result. We would check the response with a
different data set to check the logics.
A follow up question on the same assignment will be asked in the next round when selected as
final criteria.

You might also like