Question

I need an example of a basic Java introduction() method for MyClone class providing first and...

I need an example of a basic Java introduction() method for MyClone class providing first and last name and statement ,
0 0
Add a comment Improve this question Transcribed image text
Answer #1
import java.util.Scanner;
 
class studentintroduction
{
   
      String firstname;
       String lastname;
       int statement;
     public:
void introduction()throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                System.out.println ("Enter firstName of Student");
                firstnamename = br.readLine();
              System.out.println ("Enter lastname of Student");
                lastnamename = br.readLine();
                statement= Integer.parseInt(br.readLine());
       void show()
{
System.out.println ("firstName = "+firstname);
System.out.println ("lastName = "+lastnamename);
System.out.println ("statement = "+statement);
 }
      
class q2Student
{
        public static void main(String args[]) throws IOException
        {
                studentintroductio s=new student();
                s.introduction();
                s.show();
Add a comment
Know the answer?
Add Answer to:
I need an example of a basic Java introduction() method for MyClone class providing first and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • JAVA Create a Java project to implement a simple Name class. This class will have the...

    JAVA Create a Java project to implement a simple Name class. This class will have the following class variable: First Name, Middle Name, Last Name, and Full Name Create the accessor/getter and mutator/setter methods. In addition to these methods, create a toString() method, which overrides the object class toString() method. This override method prints the current value of any of this class object. Create a main() method to test your project.

  • Introduction to Java programming You will create a secure password. Ask a user to enter first...

    Introduction to Java programming You will create a secure password. Ask a user to enter first name and last name. (Allow for mixed case) Create a random integer from 10-99. Create the password string that consists of the upper case letter of the last letter of his/her first name, the random number, and the first three letters of his/her last name in lower case. Example someone with the name Rob Lee might have a password that looks like B56lee. Your...

  • JAVA We are learning about java databases in my highschool java class. I Need some help...

    JAVA We are learning about java databases in my highschool java class. I Need some help with it. Create a Java program (feel free to do it all in a main method) that works with a database that contains your 'Contractors' table (see the last exercise). Id (integer, primary key) CompanyName (varchar, 30 characters) Phone(varchar, 12 characters) ContactName(varchar, 30 characters) Rating (integer) OutOfStateService (boolean) # company name phone # Name rating Out of state service 1 Joe's Brewery 1111111111 Joe...

  • I have a java class that i need to rewrite in python. this is what i...

    I have a java class that i need to rewrite in python. this is what i have so far: class Publisher: __publisherName='' __publisherAddress=''    def __init__(self,publisherName,publisherAddress): self.__publisherName=publisherName self.__publisherAddress=publisherAddress    def getName(self): return self.__publisherName    def setName(self,publisherName): self.__publisherName=publisherName    def getAddress(self): return self.__publisherAddress    def setAddress(self,publisherAddress): self.__publisherAddress=publisherAddress    def toString(self): and here is the Java class that i need in python: public class Publisher { //Todo: Publisher has a name and an address. private String name; private String address; public Publisher(String...

  • For java class Assume a Student class has two variables: Name and Grade. Write an example...

    For java class Assume a Student class has two variables: Name and Grade. Write an example of a get method and a set method for each of the two variables

  • I need help with 11.15 Area convex polygon in introduction to Java programming and data structures....

    I need help with 11.15 Area convex polygon in introduction to Java programming and data structures. I havent had any luck creaating it effectivly. (The Course class) Rewrite the Course class in Listing 10.6. Use an Array List to replace an array to store students. Draw the new UML diagram for tde class. You should not change the original contract of the Course class (ie, the definition of the constructors and methods should not be changed, but the private members...

  • JAVA basic quiz. 1. a) In order to run a java program, the computer must first...

    JAVA basic quiz. 1. a) In order to run a java program, the computer must first compile the .java files to create .class files. Then the Java Virtual Machine (JVM) runs the .class files. After compilation, when the JVM first starts to run the program, what is created in memory first? When do instances of an object get created? How long do they stay in memory? Under what circumstances will the JVM delete an object from memory? b)What are the...

  • I need help in this basic java programming. I just need a program that output this...

    I need help in this basic java programming. I just need a program that output this according to the original picture above. Quick Access 熅Package Explorer 23 曰ちい▽ーロ D Volunteer,java D Volunteer Test.java 23 -ロ 貝Task List 2 public class VolunteerTest ▼申(default package) Volunteer java 4 public static void main(String[] args) Find THIS CODE MUST NOT BE CHANGED IN ANY WAY!1 JRE System Library [JavaSE-18] // The code below will be used to test the Volunteer class I/ created by...

  • *MYST BE I NJAVA* *PLEASE INCORPORATE ALL OF STRING METHODS AND SCANNER METHOD LISTED IN THE...

    *MYST BE I NJAVA* *PLEASE INCORPORATE ALL OF STRING METHODS AND SCANNER METHOD LISTED IN THE DIRECTIONS BELOW* Write a Java class that takes a full name (first and last) as inputted by the user, and outputs the initials. Call the class Initials. The first and last names should be entered on the same input line i.e. there should be only one input to your program. For example, if the name is Jane Doe, the initials outputted will be J...

  • Java program Candidate Class: This class records the information for each candidate that is running for...

    Java program Candidate Class: This class records the information for each candidate that is running for office. Instance variables: first name last name office they are running for the party they represent total votes a boolean value to record if they won Methods: Custom constructor that accepts first and last name, office and party Custom constructor that accepts an instance of another customer Getters for all instance variables and setters for total votes and the boolean variable toString: This method...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT