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 program to prompt user to enter a hex digit character

Write a program which will prompt user to enter ahex digit character ("0" ..."9" or "A" .."F") ,display it on next line in decimal, and ask user if he or she wants to do it again.

  Design and develop a unix file sharing system

Design and develop a UNIX file sharing system. For this task you will be required to develop a simple application in C programming language.

  Create a dtd for a small xml data set

Create a DTD for a small XML data set drawn from the Stanford course catalog. There are multiple departments, each with a department chair.

  Write program which lets user enter charge account number

Write the program which lets user enter a charge account number. The program must determine if number is valid by checking for it in following list.

  Write down the application which makes a quiz

Write down the application which makes a quiz which comprises at least three questions about hobby, music, or any other personal interest.

  Write method to accept stack containing some elements

Write a method that accepts a stack containing some elements from the file "Q1.txt" and returns a new stack containing the same elements and in the same order as the original stack.

  Design the logic for application for company

Design logic for an application for company which wants a report containing a breakdown of payroll by department. Input includes each employee's last name, first name, department number.

  Write function template that accepts array

Write a function template arraySum () whihc accepts an array and number of values stored in it and returns sum of those values.

  Develop console application utilizes while loop to count

Develop a C++ console application which utilizes a while loop to count, total, and average series of positive integers entered by a user.

  Write program which inputs employee name

Write the program which inputs Employee Name and Tuition and prints, for each employee, Name and Rebate Amount.

  Write a set-list of enumerated constants for week

Write a set/list of enumerated constants called week which contains days of the week. Have variable called today that is of type week. Allot value to today.

  Explain encapsulation of data and methods

Explain the following three key concepts of object-oriented technology. Illustrate each one using examples. a) Encapsulation of data and methods b) Support for polymorphism c) Inheritance within class hierarchies.

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