Using OOP, write a C++ program that will read in a file of names. The file is called Names.txt and should be located in the current directory of your program. Read in and store the names into an array of 30 names. Sort the array using the selection sort or the bubblesort code found in your textbook. List the roster of students in ascending alphabetical order. Projects using global variables or not using a class and object will result in a grade submission of 0.
The Names used for the Names.txt are: Jackie, Sam, Bill, Tom,
Mary, Paul, Zev, Barb, John, Sharon, Dana, Dominic, Steven,
Padro,,Katey, Kathy, Darius, Angela, Mimi,Jesse
Kenny, Lynn, Hector, Brittany, Jenn, Joe, Chloe, Geena, Sylvia,
Dean.
I tried this solution on this question and it had a lot of errors.
In: Computer Science
Create a Visual Studio console project named exercise101. The main() function should prompt for the name of a text file located in the same directory as exercise101.cpp, and search for a word in the text file as follows:
Enter text file name:
Enter search word:
The program should print the number of occurrences of the word in the file:
occurrences of were found in If the file could not be opened then display:
File not found Use Stream file I/O as a guide to opening and reading a stream input file.
You should read the file word by word, where a word is a set of characters preceded and followed by white space including newlines.
Test you program by searching for the word "government" in the usdeclar.txt file available in Files / Source code / Exercise 10.1 Upload your exercise101.cpp source file to Canvas.
In: Computer Science
. Create a batch file (hw3_yourlastname1.bat) which will schedule tasks on the system using Windows 10’s Scheduled Task Console utility - schtasks
Your batch file (hw3_yourlastname1.bat) will include instructions to do the followings:
a. List the directories and files in the current directory
b. Pause the script to see the list of directories and files
c. Clear the screen
d. Pause the script
e. Schedule a task to start Check Disk (chkdsk.exe) every Friday at 5:30pm using Scheduled Task Console (schtasks) utility
f. Schedule a task to start Disk Defragmenter (dfrgui.exe) every 1st day of a month at 11:30pm using Scheduled Task Console (schtasks) utility
g. Display all the scheduled tasks on the system
h. Pause the script to see the list of scheduled tasks
In: Computer Science
import os
def process_dir(p, indent):
for item in os.listdir(path):
if os.path.isfile("{0}/{1}".format(path, item)):
print("\t"*indent, item)
elif os.path.isdir("{0}/{1}".format(path, item)):
print("\t"*indent, "\x1b[1;31m{}\x1b[0;0m".format(item))
process_dir("{0}/{1}".format(path, item), indent+1)
else:
print("Not a file or directory")
path=input("Enter a valid system path: ")
print("\x1b[1;31m{}\x1b[0;0m".format(path))
process_dir(path, 1)
In: Computer Science
Since an early age, Kendall has had what most people called a “short fuse.” Because he would always argue and start fights, it became difficult for him to make friends during his school years. In addition, nothing seemed to curb the angry response Kendall displayed when his parents tried to discipline him. Aside from his inability to control his temper, Kendall was intelligent and athletic. He made good grades and engaged in competitive sports. Social relationships remained an issue as he was controlling and impulsive.
After graduating from college, Kendall works in a pharmaceutical laboratory. Co-workers describe him as “touchy” and “easily ticked off,” but very brilliant and efficient at what he does. On one particular day, Kendall is unable to contain his anger over an incident in which a lab technician makes an error in a chemical formula. Kendall becomes so irate and angry, he throws the flask across the room narrowly missing the young technician’s head. The technician runs out of the lab screaming that “Ken has lost it this time.” Kendall is put on leave from the company and is required to enter treatment for anger management.
1. How are anger and aggression evident in Kendall’s situation?
2. In what ways might Kendall’s behavior be a conditioned response?
3. What methods might be used to help him diffuse some
In: Nursing
In: Nursing
In an article in the Journal of Marketing, Bayus studied the differences between "early replacement buyers" and "late replacement buyers" in making consumer durable good replacement purchases. Early replacement buyers are consumers who replace a product during the early part of its lifetime, while late replacement buyers make replacement purchases late in the product's lifetime. In particular, Bayus studied automobile replacement purchases. Consumers who traded in cars with ages of zero to three years and mileages of no more than 35,000 miles were classified as early replacement buyers. Consumers who traded in cars with ages of seven or more years and mileages of more than 73,000 miles were classified as late replacement buyers. Bayus compared the two groups of buyers with respect to demographic variables such as income, education, age, and so forth. He also compared the two groups with respect to the amount of search activity in the replacement purchase process. Variables compared included the number of dealers visited, the time spent gathering information, and the time spent visiting dealers. Regard the sample of 500 late replacement buyers for which σ = .58. How large a sample of late replacement buyers is needed to make us (Round up your answers to the next whole number.):
(a) 99 percent confident that ¯ x¯ , the sample mean number of dealers visited, is within a margin of error of .04 of µ, the population mean number of dealers visited? n______ buyers
(b) 99.73 percent confident that ¯ x¯ is within a margin of error of .05 of µ? n_____ buyers
In: Statistics and Probability
In an article in the Journal of Marketing, Bayus studied the differences between "early replacement buyers" and "late replacement buyers" in making consumer durable good replacement purchases. Early replacement buyers are consumers who replace a product during the early part of its lifetime, while late replacement buyers make replacement purchases late in the product's lifetime. In particular, Bayus studied automobile replacement purchases. Consumers who traded in cars with ages of zero to three years and mileages of no more than 35,000 miles were classified as early replacement buyers. Consumers who traded in cars with ages of seven or more years and mileages of more than 73,000 miles were classified as late replacement buyers. Bayus compared the two groups of buyers with respect to demographic variables such as income, education, age, and so forth. He also compared the two groups with respect to the amount of search activity in the replacement purchase process. Variables compared included the number of dealers visited, the time spent gathering information, and the time spent visiting dealers. Regard the sample of 500 late replacement buyers for which σ = .50. How large a sample of late replacement buyers is needed to make us (Round up your answers to the next whole number.):
(a) 99 percent confident that x¯x¯ , the sample
mean number of dealers visited, is within a margin of error of .04
of µ, the population mean number of dealers
visited?
n ___________ buyers
(b) 99.73 percent confident that x¯x¯ is within a margin of error of .05 of µ?
n ___________ buyers
In: Statistics and Probability
Make a macro analysis on the Republic of Korea ( South Korea) by answering each of the following points:
Main description (type of government, type and size of economy)
GDP and GDP growth
GDP components
Balance of payments. Deficit or surplus?. X and M: main products, main destinies/origins
General productivity. In which products/services is higher?
Comparative / Absolutes advantages (which products/services)
Capital flows (inflows/outflows, foreign investments)
Unemployment (%, type: structural or frictional? Why?)
Inflation (%, causes?)
Financial system: financial markets, banking system (main players and characteristics of the domestic credit market)
Tax structure (main taxes: type, characteristics and %)
Monetary policy: main description and characteristics (expansionary/contractive, interest rates level, main instruments)
Fiscal policy: main description and characteristics. Fiscal deficit or surplus?
Exchange rate policy: main description (regime) and characteristics
Macro effects of Covid on the country (GDP growth, unemployment, inflation/deflation, fiscal)
In: Economics
You are in senior management in a South African company that exports fresh produce to the SADC region. Your company seeks to grow its footprint into Africa. You have been tasked to identify two countries in the East African Community where there are lucrative opportunities for exporting fresh produce. You have been asked to select these two countries on the basis of the extent to which each of the two countries in the EAC is globalised. You have done your research that analyses the extent to which each country in the EAC is globalized. Write a report to the board of your company with recommendations on which two countries to expand to, using at least three globalisation indices to support your recommendations.
In: Economics