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 a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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