assignmentOne is modified#2
Open
kulkarni-laxmi wants to merge 2 commits into
Open
Conversation
satishba
reviewed
Nov 23, 2022
| eeeStudent2.marks(); | ||
|
|
||
| // <TO DO: Print the max marks of both students> | ||
| eeeStudent1.marks(); |
Owner
There was a problem hiding this comment.
What is the need for this call ?
| // <TO DO: Print the max marks of both students> | ||
| eeeStudent1.marks(); | ||
| int max1=arr[0]; | ||
| for(int i=0;i<8;i++){ |
Owner
There was a problem hiding this comment.
Create a method inside the class
|
|
||
| eeeStudent2.marks(); | ||
| int max2=arr[0]; | ||
| for(int i=0;i<8;i++){ |
Owner
There was a problem hiding this comment.
Create a method inside the class to find max marks
| Scanner sc = new Scanner(System.in); | ||
| char index = sc.next().charAt(0); | ||
| if(index==char[i]){ | ||
| if(eeeStudent1.marks() > eeeStudent2.marks()) |
Owner
There was a problem hiding this comment.
isnt marks the method to set the marks? Why is it being called here ?
Author
|
Ook sir will look into this and get changes done which you have mentioned.
…On Thu, 24 Nov, 2022, 12:22 am satishba, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In assignemntOne.java
<#2 (comment)>
:
>
+// <TO DO: Assign marks to students>
+
+ eeeStudent1.marks();
+ eeeStudent2.marks();
+
+// <TO DO: Print the max marks of both students>
+ eeeStudent1.marks();
What is the need for this call ?
------------------------------
In assignemntOne.java
<#2 (comment)>
:
>
+// <TO DO: Assign marks to students>
+
+ eeeStudent1.marks();
+ eeeStudent2.marks();
+
+// <TO DO: Print the max marks of both students>
+ eeeStudent1.marks();
+ int max1=arr[0];
+ for(int i=0;i<8;i++){
Create a method inside the class
------------------------------
In assignemntOne.java
<#2 (comment)>
:
> +
+ eeeStudent1.marks();
+ eeeStudent2.marks();
+
+// <TO DO: Print the max marks of both students>
+ eeeStudent1.marks();
+ int max1=arr[0];
+ for(int i=0;i<8;i++){
+ if(arr[i]>max1)
+ max1=arr[i];
+ }
+ System.out.println(max1);
+
+ eeeStudent2.marks();
+ int max2=arr[0];
+ for(int i=0;i<8;i++){
Create a method inside the class to find max marks
------------------------------
In assignemntOne.java
<#2 (comment)>
:
> + eeeStudent2.marks();
+ int max2=arr[0];
+ for(int i=0;i<8;i++){
+ if(arr[i]>max2)
+ max2=arr[i];
+ }
+ System.out.println(max2);
+
+// <TO DO: Take input of a subject index from user and print
+// which student has more marks in that subject>
+
+ char[] sub=new char[6];
+ Scanner sc = new Scanner(System.in);
+ char index = sc.next().charAt(0);
+ if(index==char[i]){
+ if(eeeStudent1.marks() > eeeStudent2.marks())
isnt marks the method to set the marks? Why is it being called here ?
—
Reply to this email directly, view it on GitHub
<#2 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3YYOLNZR5WDZMHFBHZFGRDWJZRWZANCNFSM6AAAAAASJHSH7M>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.