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

  Find the maximum and minimum of a list of numbers

Write a prolog program to find the maximum and minimum of a list of numbers.

  Write program which asks user for number of bolts

Write C++ program which asks user for number of bolts and number of nuts in their purchase and then computes and prints out total cost.

  Explaining data-driven multicast routing paradigm

The data-driven multicast routing paradigm works best on local networks that have low delay and excess capacity, while the demand driven paradigm works best in a wide are environment.

  Find the shortest sequence of mips instructions

Find the shortest sequence of MIPS instructions that extracts bits 16 down to 11 from register $t0 and uses the value of this field to replace bits 31 down to 26 in register $t1 without changing the other 26 bits of register $t1.

  Create algorithm and flowchart for amount to be doubled

Create the algorithm and the corresponding flowchart which print out after how many years will this amount be doubled.

  Describe the contents of text box after button is clicked

Describe the contents of the text box after the button is clicked

  How to make game in pascal programming lanuage

How to make game in pascal programming lanuage

  Write the code for the instantiable class bus

Write the code for the instantiable class Bus, which represents a bus that moves passengers around in a simulated city. Bus objects have a ticket price, a maximum capacity of passengers, and a current number of passengers.

  Program that specialized in solving the equations

Write a program that specialized in solving the equations Ax = b by Doolittle's decomposition method, where A is the hilbert matrix of arbitrary size n x n, and bi = the summation of Aij for j = 1 to n.

  During the middle ages

During the Middle Ages, to determine the successor to the throne of France, the French used the Salic law. It is formulated as follows: the next to the throne is the living male descendant of the most direct male royal. Male royal here means that ..

  Create project to compute checking account balance

Create a project to compute your checking account balance. Form: Include radio buttons to indicate the type of transaction: deposit, check, or service charge.

  Write a program that will operate the alarm simulation

Write a program that will operate the Alarm Simulation, using the following inputs and outputs and whatever Timers and Flags are required.

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