Data members and methods

Assignment Help Business Management
Reference no: EM131876811

This is an assignment I have for my intro to programming class for java. This is done through the eclipse program. I need help. Thanks!. I already made the class named Module 2 and made the data members. I am in step 2 where i need to make methods.

Class named Module2 containing the following data members and methods (note that all data members and methods are for objects unless specified as being for the entire class)

1) Data members:

a. A Scanner object named reader (your class will need to import the Scanner class)

b. A String object named inputString

c. Two int variables named startIndex and endIndex

2) Methods:

a. A Module2 constructor method that initializes reader to nullinputString to "" (an empty String), and startIndex and endIndex to -1.

b. A main method that, in order:

  • Creates a new Module2 object using the constructor from a)
  • Prints the text "starting application" to the console
  • Calls method c) with the argument "Please enter your name" and prints its returned String to the console
  • Calls method d) with the argument "Please enter a starting index value" and prints its returned String to the console
  • Calls method e) with the argument "Please enter an ending index value" and prints its returned String to the console
  • Prints the text "ending application" to the console

c. A method named getInputString that accepts a String parameter, prints the parameter String to the console, accepts a user-entered String via the console (use Scanner.nextLine()), sets the object's inputString to match the input and returns (as a String) the text "Thank you."

d. A method named getInputStart that accepts a String parameter, prints the parameter String to the console, accepts a user-entered int via the console (use Scanner.nextInt()), sets the object's startIndex to match the input and returns (as a String) the text "Thank you."

e. A method named getInputEnd that accepts a String parameter, prints the parameter String to the console, accepts a user-entered int via the console (use Scanner.nextInt()), sets the object's endIndex to match the input and returns (as a String) the text "Thank you. The substring between the two indices is " concatenated with inputString.substring(startIndex, endIndex).

Reference no: EM131876811

Questions Cloud

Analyze the labor market of your chosen profession : Analyze the labor market of your chosen profession, evaluate your industry's labor market needs, learn about trends and role/job requirements.
Is javascript a scripting or programming language : Is JavaScript a scripting or programming language? Please explain to me so that I understand the why or why not?
Romance world cruise line : Display a couple's data with the message "Newlywed Gift" if the couple has been married a year or less, "Deluxe Anniversary Package"
What are the caats : Segregation of duties is required by Sarbanes Oxley Act for publically traded organizations. It is a proven management technique that organizations.
Data members and methods : Class named Module2 containing the following data members and methods (note that all data members and methods are for objects unless specified as being
What is holding you back from achieving your dreams : What is holding you back from achieving your dreams? What do you need to do NOW in order to live a meaningful and purposeful life?
Pseudocode that reads the grades for students : Write=a pseudocode that reads the grades for 20 students, stores them in an array, calculates and displays the average of the class.
How does the internet affect the privacy of individuals : Theme 2 this week focuses on the questions of Corporate Responsibility and Sustainability as well as the issues arising from the unprecedented.
What is the responsibility of a senior gra or supervisor : What is the responsibility of a senior GRA or supervisor? What is a staffing guide and how is it useful to an executive housekeeper?

Reviews

Write a Review

Business Management Questions & Answers

  Licensing, franchising, or joint venturing

If a United States firm wanted to sell its products to other nations for the first time, which strategy should it start with: Licensing, Franchising, or Joint-Venturing?

  Marriott international and its aspects of culture

Write a paper on the characteristics of the company that make it one of the 100 best companies to work for. Discuss what the company does, aspect of its culture, and why it is successful. Your paper should be 5 pages.

  Organizations do to effectively manage diversity

What can individuals, leaders, and organizations do to effectively manage diversity? Provide an example with your response. Include references such as your textbook, journals, trade articles, etc., to support your response. Properly cite any refere..

  Clear statement of the central business problem in the case

A clear statement of the central business problem in the case - A statement and rank ordering of the critical issues in the case. You might also briefly explain why each issue is important.

  Mba course organizational behavior

In this discussion question you have the opportunity to be creative and to relate what you have learned to your professional lives. Please explore and critically think about some of the learning objectives and concepts presented in this course.

  Anachronism for a modern and diverse united states

The electoral college is considered an anachronism for a modern and diverse United States. Identify and explain three defects with the electoral college. Identify and explain two reforms suggested for the electoral college.

  Prepapre a mission or vision statement for your organization

Create mission or vision statement for your organization. How much money you will require to become established in business, and state how you would finance your venture. Also discuss your plans for maintaining your budget.

  Multiple ospf areas have to connect to area 0

1. Name one troubleshooting command you would use when troubleshooting an OSPF network. Explain what the command does and what field in particular you would look at to find out what is going on. 2. What is Area 0 and do multiple OSPF areas have to..

  Identify objectives for improving organizations business

Identify at least three objectives for improving the organization's internal business processes, and show how they relate to the mission, vision and strategy of the organization.

  Determination of horizon value

Akyol Company is undergoing a restructuring, and its free cash flows are expected to be unstable during next some years. However, FCF is expected to be $50 million in Year five,

  Capital structure weights on a book value basis

i. What are Wang Ltd's capital structure weights on a book value basis? ii. What are Wang Ltd's capital structure weights on a market value basis?

  Expain professional ethics and responsibilities of employees

Expain professional ethics and responsibilities of employees to the community and professional ethics and responsibilities of intermediaries;

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd