Write a new class file with a main() method in the project

Assignment Help Programming Languages
Reference no: EM13785066

"Arrays, Files, and Sorting"

Part 1 - Make a number Generator main class

1. Randomize a number as the count, store the count in a file named numbers.txt

2. Using the first randomized number, create a loop generating new randomized numbers, storing each new number on a new line in the text file each iteration. example of what numbers.txt might look like:

11
3
2
8
23
18
7
14
19
1
3
20

example of another run of your program's numbers.txt:

5 - this is the count

12 - this is the first number

9 - second number

5 - third

22 - fourth

5 - and fifth number

Part 2 - make a new file, a Sorting main class

1. Load the numbers.txt file from Part 1 of this project and read the data into an array. p. 545

2. Sort the numbers loaded in from number.txt from low to high using any sorting algorithm you like (for example, insertion sort). p. 251

3. Create a file named numout.txt and store the sorted numbers in the file, each number on its own line. p.544

Part 3 - Strings

Make a list of 10 names, each on it's own line in a text editor and store them in a text file named names.txt. On the first line, however, type the number of name entries.

Part 4 - make a new file, a Names main class

Write a new class file with a main() method in the same project, use it to load in the names.txt, sort the names, and store them to a file called, nameout.txt. Each name on its own line. example:

if your names.txt file is:

Bible, James
Skywalker, Luke
Hogan, Robert
Austin, Steve
Nelson, Anthony
Hawking, Stephen
Lucas, George
your nameout.txt should be:
Austin, Steve
Bible, James
Hawking, Stephen
Hogan, Robert
Lucas, George
Nelson, Anthony
Skywalker, Luke

Reference no: EM13785066

Questions Cloud

About quantitative research plan : Normal 0 false false false EN-US X-NONE X-NONE Quantitative Research Plan
Operations costing and a process costing system : What is the difference between operations costing and a process costing system? How does a company decide whether to use a job order or a process cost system?
What arguments would the companies make : The manager said that there was nothing they could do since the 30-day period expired. Discuss Shayna's rights related to Best Buy and Apple. What arguments would the companies make? Discuss the probable outcome and support your answer with app..
Write a new class file with a main() method in the project : Write a new class file with a main() method in the same project, use it to load in the names.txt, sort the names, and store them to a file called, nameout.txt. Each name on its own line.
Explain any possible impact on the parties : Your analysis must be double-spaced, font size 12 and between 500 to 1000 words in length. Analyze the legal issues. Explain the law
Issues of hidden bias, privilege, and microaggressions : Describe a time you witnessed a microaggression. What was the underlying message?
Developing a budget for a security action plan : Thoroughly discuss all of the elements associated with developing a budget for a security action plan. Include a discussion about why budgets should be developed during the planning process and the possible consequences associated with developing ..
Write a annotated bibliography about wireless security : Write a Annotated Bibliography about `wireless security, which is not a topic any of you will be doing, but it works as a sample of what we are looking for.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write pseudocode for the function of nonplayercharacter

Identify two additional classes needed for a more detailed class model. Their names should be descriptive enough to indicate their overall responsibilities.

  Create program by using pseudocode along with structure

Create a program by using pseudocode along with structure to do the following. Permit the user to enter series of temperatures in degrees Celsius (C) terminated by -999.

  Write a program to print average grade of student

Write a program that read the grades.txt file and then prints the average grade of male and female students and the number of passed students by using the functions.

  Write class to hold hourly rate of pay

Write down the class which comprises variables which hold your hourly rate of pay and number of hours that you worked. Illustrate your gross pay.

  Shows the graphic simulation of the elevator

The elevator could be called from level 2 by the external call button IP0 being pressed. The elevator doors should then close via OP3, once closed IP5 (doors closed sensor) should energise.

  Manage the tags associated with web resources

A product that is the tagging of web resources; it would allow the tagging, as well as the management of the tags; perhaps it would include different ways of browsing and visualizing tags (e.g., tag clouds).

  Develop a functional web-based application for a calculator

Develop a functional web-based application for a calculator. It does not need to be live; you can provide JavaScript, CSS, and HTML files. The calculator should successfully complete addition, subtraction, multiplication, and division operations.

  Rewrite the code using a select case block

Rewrite the code using a Select Case block and Determine the output displayed in the text box when the button is clicked

  Develop program for concrete class in hierarchy

Develop program which reference objects of each concrete (non-abstract) class in hierarchy. Write down abstract method "display" which determines whether displayed shape is TwoDimensionalShape.

  Write client-side javascript function to convert ampersands

Your job is to write a client-side JavaScript function that converts all ampersands in a form field to the text string " and " when the form loses focus on the textbox in question.

  Write ipo steps and detailed pseudo code for program

Write IPO steps and detailed pseudo code for program which will ask user to enter restaurant meal cost. The program should then compute the tax, tip on the restaurant bill,

  Display total amount owed in fixed-point notation

Enter your C++ instructions into a source file named Introductory11.cpp. Also enter appropriate comments and any additional instructions required by the compiler. Display the total amount owed in fixed-point notation with two decimal places.

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