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...
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):...
1. Create a console program in C#, * Create a class: "Student.cs" * Add 3 variables:...
1. Create a console program in C#, * Create a class: "Student.cs" * Add 3 variables: StudentName (string), SchoolYear (int), YearsUntilGraduation(int) * Method YTK() = 12 - SchoolYear; 2. Main *Enter name *Enter age *You will attend school:____ years before graduating.
IN JAVA: Repeat Exercise 28, but add the methods to the LinkedStack class. Add the following...
IN JAVA: Repeat Exercise 28, but add the methods to the LinkedStack class. Add the following methods to the LinkedStacked 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 LinkedStacked, not by calling the previously defined public methods of the class. - String toString()—creates and returns a string that correctly represents the current stack....
C# Programming (Class Registration class) Add a Schedule property to the Person class. Add a new...
C# Programming (Class Registration class) Add a Schedule property to the Person class. Add a new behavior as well: add(Section s) this behavior will add a section to the Person’s schedule. The Person’s display() function will also need to be modified to display() the Person’s Schedule. Schedule class has Properties: An array of Sections and a Count. Constructors: only a default constructor is needed. Behaviors: add() and display(). This is my schedule class class Schedule     {         private int...
Create a class DogWalker member List <String>doggies method: void addDog(String name ) //add dog to the...
Create a class DogWalker member List <String>doggies method: void addDog(String name ) //add dog to the List method: void printDogList() //print all dogs in list /* You’ll need an index. Iterate over your list of dog names in a while loop. Use your index to “get” the dog at the current index When you ‘find’ your dog name in the list, print it out */ Method: void findDogUsingWhile(String dogName) /* You’ll need an index. Iterate over your list of dog...
IN JAVA PLEASE Create a class called Child with an instance data values: name and age....
IN JAVA PLEASE Create a class called Child with an instance data values: name and age. a. Define a constructor to accept and initialize instance data b. include setter and getter methods for instance data c. include a toString method that returns a one line description of the child
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT