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

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

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