Question

In: Computer Science

1. Please create a New Class with the Class Name: Class17Ex Please add the ten methods:...

1. Please create a New Class with the Class Name: Class17Ex

Please add the ten methods:

1. numberOfStudents

2. getName

3. getStudentID

4. getCredits

5. getLoginName

6. getTime

7. getValue

8. getDisplayValue

9. sum

10. max

Show Class17Ex.java file with full working please. Let me know if you have any questions.

Solutions

Expert Solution

The above mentioned program is the java program which includes 10 methods. As we all know methods are a block of code which is executed only when it is called.

In the above question, 10 methods are provided.

So, the program will be :

  

import java.util.scanner; //primary header file

public class Class17Ex //class as specified in question

{

public static void numberOfstudents( int n) //first method

{

system.out.println("enter the number of Students:");

int n=new int(System.in);

}

public ststic void getName( str name) //second method

{

system.out.println("enter the name of the student:");

String name=new str(System.in);

}

public ststic void getStudentID( int ID)   //third method

{

system.out.println("enter the Identity number of the student:");

int ID=new int(System.in);

}

public ststic void getCredits( str Credits) //fourth method

{

system.out.println("enter the credits  of the student:");

String credits=new str(System.in);

}

public static getLoginName( str[arg])

{

system.out.println("enter the login name of the student");

string arg=new str(System.in);

if(getName()==arg)

{

system.out.println("Login Success");

}

}

public static getTime( int time)

{

system.out.println("The time of login is :");

int time =new int(System.in);

}

public ststic getValue( str val)

{

system.out.println("enter the value of the student:");

String val=new str(System.in);

}

public ststic void getDisplayValue( str disval)

{

system.out.println("The value entered is:"+getValue());

}

public static sum()

{

vals.add();

}

}

public ststic void main(str[args])   //the main function

{

numberOfstudents();   //calling the methods

getName();

getStudentID();

getCredits();

getLoginTime();

getTime();

getValue();

getDisplayValue();

sum();

Note: if further modification required, comment.Plzz dont dislike.


Related Solutions

1. Create a class Car with data: Name, Price, Production and properly methods. 2. Create another...
1. Create a class Car with data: Name, Price, Production and properly methods. 2. Create another class named GenericCar with a parameter of the T type. This class manages a collection of object T (may be LinkedList) named a. Implementing some methods for GenericCar: Add: add new item of T to a Display: display all items of a getSize: return the number item of a checkEmpty: check and return whether a is empty or not delete(int pos): remove the item...
Create java Class with name Conversion. Instructions for Conversion class: The Conversion class will contain methods...
Create java Class with name Conversion. Instructions for Conversion class: The Conversion class will contain methods designed to perform simple conversions. Specifically, you will be writing methods to convert temperature between Fahrenheit and Celsius and length between meters and inches and practicing overloading methods. See the API document for the Conversion class for a list of the methods you will write. Also, because all of the methods of the Conversion class will be static, you should ensure that it is...
java code Add the following methods to the LinkedQueue class, and create a test driver for...
java code Add the following methods to the LinkedQueue class, and create a test driver for each to show that they work correctly. In order to practice your linked list cod- ing skills, code each of these methods by accessing the internal variables of the LinkedQueue, not by calling the previously de?ined public methods of the class. String toString() creates and returns a string that correctly represents the current queue. Such a method could prove useful for testing and debugging...
28. Add the following methods to the ArrayBoundedStack class, and create a test driver for each...
28. Add the following methods to the ArrayBoundedStack class, and create a test driver for each to show that they work correctly. In order to practice your array related coding skills, code each of these methods by accessing the internal variables of the ArrayBoundedStack, not by calling the previously defined public methods of the class. a. String toString()—creates and returns a string that correctly represents the current stack. Such a method could prove useful for testing and debugging the class...
Create a new file name condition_quiz.py. Add a comment with your name and the date. Prompt...
Create a new file name condition_quiz.py. Add a comment with your name and the date. Prompt the user to enter the cost. Convert the input to a float. Prompt the user for a status. Convert the status to an integer Compute the special_fee based on the status. If the status is 0, the special_fee will be 0.03 of the cost. Else if the status is 1, the special_fee will be 0.04 of the cost. Else if the status is 2,...
python Create a new file name condition_quiz.py. Add a comment with your name and the date....
python Create a new file name condition_quiz.py. Add a comment with your name and the date. Prompt the user to enter the cost. Convert the input to a float. Prompt the user for a status. Convert the status to an integer Compute the special_fee based on the status. If the status is 0, the special_fee will be 0.03 of the cost. Else if the status is 1, the special_fee will be 0.04 of the cost. Else if the status is...
Code in Java 1. Create a class Flower with data: Name, Price, Color and properly methods....
Code in Java 1. Create a class Flower with data: Name, Price, Color and properly methods. 2. Create another class named ListFlower. This class manages a collection of Flower (may be LinkedList) named a. Implementing some methods for ListFlower: Add: add new item of Flower to a Display: display all items of a sort(): sort as descending by Price and display all items of a search(Flower f): check and return whether f is exists in a or not. delete(int pos):...
Java Language -Create a project and a class with a main method, TestCollectors. -Add new class,...
Java Language -Create a project and a class with a main method, TestCollectors. -Add new class, Collector, which has an int instance variable collected, to keep track of how many of something they collected, another available, for how many of that thing exist, and a boolean completist, which is true if we want to collect every item available, or false if we don't care about having the complete set. -Add a method addToCollection. In this method, add one to collected...
Add code to the Account class and create a new class called BalanceComparator. import java.util.*; public...
Add code to the Account class and create a new class called BalanceComparator. import java.util.*; public final class Account implements Comparable {     private String firstName;     private String lastName;     private int accountNumber;     private double balance;     private boolean isNewAccount;     public Account(             String firstName,             String lastName,             int accountNumber,             double balance,             boolean isNewAccount     ) {         this.firstName = firstName;         this.lastName = lastName;         this.accountNumber = accountNumber;         this.balance = balance;         this.isNewAccount = isNewAccount;     }     /**      * TO DO: override equals      */     @Override     public boolean equals(Object other) {...
Create a student class that stores name, registration number and percentage, grade. Add member functions -...
Create a student class that stores name, registration number and percentage, grade. Add member functions - Read( string n, int r, float p): Read function that accepts parameter - Display(): To display student’s information - CalculateGrade()
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT