Consider the following class definition that has comments in Figure 5. Add method definitions in the blank areas denoted by . for each method as the comment that precedes it indicates. public class Student { private String name; // the student's full name private String id; // the student ID private int credits; // the amount of credits for study taken so far I/ Create a new student with a given name and ID number. public Student (String fullName, String studentlID) { name = fullName; id = studentID; credits = 0; } // Return the full name of this student. I/ Set a new name for this student. // Return the student ID of this student. I/ Add some credit points to the student's accumulated credits. /* Check the number of credit points this student has accumulated. * If it is less than 132, then print “Not yet graduated", otherwise print “Graduated". */ // Print the student's name and ID number to the output terminal.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Consider the following class definition that has comments in Figure 5. Add method definitions in
the blank areas denoted by ...
... for each method as the comment that precedes it indicates.
public class Student
{ private String name; // the student's full name
private String id; // the student ID
private int credits; // the amount of credits for study taken so far
// Create a new student with a given name and ID number.
public Student (String fullName, String studentID)
{ name = fullName;
id = studentID;
credits = 0; }
// Return the full name of this student.
// Set a new name for this student.
// Return the student ID of this student.
// Add some credit points to the student's accumulated credits.
/* Check the number of credit points this student has accumulated.
* If it is less than 132, then print “Not yet graduated", otherwise print "Graduated".
// Print the student's name and ID number to the output terminal.
Figure 5
Transcribed Image Text:Consider the following class definition that has comments in Figure 5. Add method definitions in the blank areas denoted by ... ... for each method as the comment that precedes it indicates. public class Student { private String name; // the student's full name private String id; // the student ID private int credits; // the amount of credits for study taken so far // Create a new student with a given name and ID number. public Student (String fullName, String studentID) { name = fullName; id = studentID; credits = 0; } // Return the full name of this student. // Set a new name for this student. // Return the student ID of this student. // Add some credit points to the student's accumulated credits. /* Check the number of credit points this student has accumulated. * If it is less than 132, then print “Not yet graduated", otherwise print "Graduated". // Print the student's name and ID number to the output terminal. Figure 5
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY