Questions
Program: Java Write a Java program using good programming principles that will aggregate the values from...

Program: Java


Write a Java program using good programming principles that will aggregate the values from several input files to calculate relevant percentages and write the values to an output file.

You have been tasked with reading in values from multiple files that contains different pieces of information by semester. The Department of Education (DOE) would like the aggregate values of performance and demographic information by academic year. A school year begins at the fall semester and concludes at the end of the summer semester the following year. Fall 2019 - Summer 2020 is considered one academic year.

Input Files

  • Input files named Fall2019Analytics.txt, Spring2020Analytics.txt, and Summer2020Analytics.txt have been placed in Canvas.   Each have the same layout but differ by semesters.
  • Each file contains several pieces of data by program - total enrollment, enrollment by gender, completion by gender, enrollment by ethnicity, completion by ethnicity, among other pieces of data.  
  • The program should read in the values from these input files, aggregate the data, and write the information to an output file that will be sent to Tallahassee.
  • From there, the DOE will use this output file as input to aggregate the data from other schools within the state of Florida.
  • It is important that this file is formatted in the proper sequence that the DOE needs - otherwise the college will be heavily fined and may lose accreditation.


These input files contain the data for three programs on campus:

Program code 3624
Program code 5651
Program code 6635

Input file layout (all integer values) by semester:

  • program number
  • total number of students enrolled in the program
  • total number of student completers in the program
  • total number of female students enrolled in the program
  • total number of male students enrolled in the program
  • total number of unknown/not reported gender students enrolled in the program
  • total number of female student completers in the program
  • total number of male student completers in the program
  • total number of unknown/not reported student completers in the program
  • total number of Asian students enrolled in the program
  • total number of Black students enrolled in the program
  • total number of Hispanic students enrolled in the program
  • total number of Multiracial students enrolled in the program
  • total number of Native American students enrolled in the program
  • total number of Native Hawaiian students enrolled in the program
  • total number of Unknown/not reported ethnicity students enrolled in the program
  • total number of White students enrolled in the program
  • total number of Asian student completers in the program
  • total number of Black student completers in the program
  • total number of Hispanic student completers in the program
  • total number of Multiracial student completers in the program
  • total number of Native American student completers in the program
  • total number of Native Hawaiian student completers in the program
  • total number of Unknown ethnicity student completers in the program
  • total number of White students completer in the program


Notes

  • Each value within the file for a program is separated by one space.
  • Each program code is on its own line in each file. There are three lines per file.
  • Use an array or arrayList to hold the values within each file.
  • Each semester should be coded within their own class.


Calculations

The following values must be calculated:

For each semester:
   - the percentage of students completers (total number of student completers / total number of students enrolled)

For each individual program code:
   - grand totals for each category (enrolled, completers, gender, and ethnicity)

Aggregate for all semesters:

   - the total number of students enrolled
   - the total number of student completers
   - the total number by gender
   - the total number by each ethnicity
   - the percentage of student completers (total completers / total enrolled)
   - the percentage of female completers (total number of female completers / total number of female enrolled)
   - the percentage of male completers
   - the percentage of each ethnicity


Output


The output for this project will be two-fold.   The output will be displayed in a Message dialog box and an output file.

The Message Dialog boxes:

Each percentage calculated should be displayed in percentage format with one decimal place.

A sample format (the values are not accurate, this is only for formatting purposes):

Santa Fe College
Academic Year 2019 - 2020
Program codes: 3624, 5651, and 6635

Aggregate total number of student enrolled:       5555
Aggregate total number of student completers: 4444

Aggregate percentage of students completing for the academic year: 81.2%

Percentage of students completing Fall 2019:             76.9%
Percentage of students completing Spring 2020:        85.3%
Percentage of students completing Summer 2020:     84.1%

On the next dialog screen, display the following:

Santa Fe College
Academic Year 2019 - 2020
Program codes: 3624, 5651, and 6635

Aggregate values for:

Female student completers:     88.8%
Male student completers:                        88.7%
Unknown/not reported completers:    89.1%

Asian completers:    90.1%
Black completers:                                        90.2%
Hispanic completers:                                 90.3%
Multiracial completers:                             90.4%
Native American completers:      90.5%
Native Hawaiian completers:                  90.6%
Unknown/Not Reported completers:   90.7%
White completers:                                       90.8%

Fall2019Analytics.txt: 3624 3729 2946 1774 1445 510 1442 1087 417 627 1021 939 216 47 15 122 742 572 977 735 181 39 11 84 3475651 4074 3585 1956 1977 141 1782 1731 72 413 927 893 314 56 37 395 1039 387 912 803 273 49 30 327 8046635 2116 1837 609 1058 449 582 1031 224 341 402 363 146 89 74 297 404 303 377 321 113 76 57 270 320

Spring2020Analytics.txt: 3624 3496 3102 1579 1238 679 1486 1017 599 703 1137 842 224 32 21 103 434 688 1007 774 221 30 21 101 2605651 3942 3711 1421 2213 308 2148 1349 214 443 739 804 310 46 37 173 1390 439 727 799 216 46 36 162 12866635 2101 1979 797 1273 31 752 1039 188 601 739 426 173 21 15 3 123 592 701 399 162 18 13 2 92

Summer2020Analytics.txt: 3624 2021 1983 771 1137 113 717 1083 183 307 526 601 211 27 4 13 332 297 506 600 208 26 4 13 3295651 3013 2883 1267 1393 353 1240 1297 346 226 402 373 102 16 13 17 1864 214 401 369 96 15 13 17 17586635 1731 1546 663 817 251 612 799 135 107 392 649 81 30 21 71 380 103 384 621 80 30 20 70 238

In: Computer Science

JAVA What is the output? Explain how you obtain this answer by hand, not using a...

JAVA

What is the output? Explain how you obtain this answer by hand, not using a computer. String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for(int i = 1; i <= 26; i *= 2) { System.out.print(alphabet.charAt(i - 1)); }

What is the output? Explain how you obtain this answer by hand, not using a computer. int n = 500; int count = 0; while (n > 1) { if (n % 2 == 0) { n /= 3; } else { n /= 2; } count++; } System.out.println(count);

A Java Swing application contains this paintComponent method for a panel. Sketch what is drawn by this method. public void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(Color.black); g.fillRect(100, 100, 200, 100); g.fillRect(300, 200, 200, 100); g.fillRect(500, 100, 200, 100); }

In: Computer Science

QUESTION ONE Huawei believes that, with the advent of 5G, Harmony OS will be able to...

QUESTION ONE
Huawei believes that, with the advent of 5G, Harmony OS will be able to resolve the next biggest challenge which is to provide seamless interoperability between the cloud, Artificial intelligence (AI) and IoT. Discuss ways in which this interoperability could help resolve today’s real-world challenges. Motivate your answers with examples.
QUESTION TWO
E-commerce has the potential of increasing the sales of devices running the Harmony operating system. What web-marketing strategies have Huawei adopted to advertise their products and services and promote their reputation?
QUESTION THREE
Using theory and practical examples, discuss how businesses have adopted the Internet of things (IoT) to create value for their customers.
QUESTION FOUR
The implementation of 5G does more harm than good? Discuss reasons why you agree or disagree with this statement.

In: Computer Science

We spent a lot of time looking at all the important elements required to design and...

We spent a lot of time looking at all the important elements required to design and launch a business website. We looked at different elements used to "measure" the success of the website. Remember clicks, click throughs, visitors, etc? So how do we optimize a website? Take a few of your favorite websites that you buy items from and talk about things you think that they could do to optimize (enhance/make better) their site

In: Computer Science

Consider dynamic arrays with geometric expansion and no shrinking. Match operations to their complexity. Always choose...

Consider dynamic arrays with geometric expansion and no shrinking. Match operations to their complexity.

Always choose the most informative answer. For instance, if an operation is O(1) and O(n) choose O(1); if an operation is O(1) and O(1) amortized, choose O(1).

Options to choose from are: O(1), O(1) amortized or O(n)

addFirst :

len (length/size) :

deleteLast :

deleteFirst :

addLast (append) :

In: Computer Science

UNIX/TERMINAL ASSIGNMENT - DIFFICULT Could you please type line by line what I should be entering...

UNIX/TERMINAL ASSIGNMENT - DIFFICULT

Could you please type line by line what I should be entering in the terminal command line to complete the assignment as instructed?

INSTRUCTIONS AS FOLLOWS:

In this lab you will create a script to backup certain number of oldest or newest files in the current directory into a compressed archived file. The objective of this lab is to familiarize and gain proficiency with the following:

• Use of command line arguments

• Use of conditional statement

• Use of for loops

You need to write a script named backup.sh which will receive 3 command line arguments. The arguments are:


• The 1st argument is the string “old” or “new” indicating whether the oldest files or the newest files needs to be backed up

• The 2nd argument is an integer indicating how many files needs to be backed up.

• The 3rd argument is the name of archive file (tar file).

Your script should perform the following functions

• Check whether 3 arguments have been passed or not.

• If three arguments have not been passed display appropriate message and exit.

• Check whether the 1st argument is not the string “old” or “new” display appropriate message and exit.

• Create a temporary directory under current directory • Using a “for loop” copy all the required files in the temporary directory.

• Create an archive file of the copied files. The name of the archive files is the 3rd argument. Compress the archived file.

• Delete the temporary directory along with copied files.

Example execution: If user type the following ./backup.sh old 5 backup.tar The script will create a compressed archive file named backup.tar.gz in the current directory containing five oldest file in the current directory. ./backup.sh new 4 backup.tar The script will create a compressed archive file named backup.tar.gz in the current directory containing four newest t file in the current directory

How would I create a script named backup.sh and do the 3 arguments?

Have some Python and C++ experience, but Unix in Terminal is completely foreign to me so as much detail as possible would be appreciated.

Thanks!

In: Computer Science

Java programming language: 1.      Create a new Netbeans project called ArrayLoop. 2.      Declare a fixed length array of...

Java programming language:

1.      Create a new Netbeans project called ArrayLoop.

2.      Declare a fixed length array of integers which can store 8 elements. Do not assign any values.

int[] myAddresses = new int[8];

3.      Create a statement which raises 2 to the power of your loop counter, then subtracts 1, and assigns that value to the corresponding element. For example, when i = 3, 2 to the third power is 8, minus 1 = 7. When i = 4, 2 to the fourth power is 16, minus 1 = 15. Etc etc for all values of i.

Fill up the entire array with these values.

4.      Use Array.toString to print out the entire Array to the console.

5.      Create another FOR loop which counts from 8 down to 1.

6.      Use the counter values as indexes to print out your Array values in REVERSE order, from largest to smallest.

7.      Create a String object which stores your last name. Mine would be myName = "Hughes";

8.      Use the .length field to find the number of char's in your name. Use that value in a new FOR loop. This loop will print out the letters of your name one at a time. For example, my output should be:

H

u

g

h

e

s

TIP: Watch out for the 'Off by one' error.

9.      SCREENSHOT AND PRINT all source code in Notepad++.

a.      MARK AND LABEL the line which defines a FOR loop

b.      MARK AND LABEL the line which declares your integer Array.

c.       MARK AND LABEL the line which stores your computed values in the Array.

d.      MARK AND LABEL the line which prints out an entire Array at once.

e.       MARK AND LABEL a line which uses a loop counter as an Array index.

f.        MARK AND LABEL a line which finds the length of your name.

SCREENSHOT AND PRINT all outputs.

In: Computer Science

In Python Complete the oddNumbers() functions to take an int (as a parameter). Return a list...

In Python Complete the oddNumbers() functions to take an int (as a parameter). Return a list of all of the odd numbers between 1 and one less than the parameter. Also, complete the evenNumbers() functions to take an int (as a parameter). Return a list of all of the even numbers between 2 and one less than the parameter.

In: Computer Science

1. Create a Python module that reads Linux_syslog_ip_parser.py that reads syslog file and parses the IPV4...

1. Create a Python module that reads Linux_syslog_ip_parser.py that reads syslog file and parses the IPV4 addresses and stores the result into a csv file. Your module should contain the following functions:

a. linux_logfile_reader(filename) function that reads the syslog file and returns all IPV4 addresses

b. count_ipfrequency(ip_list) function that accepts the list of IPV4 addresses retuned by linux_logfile_reader function and returns a dictionary list with ip:frequency pair.

c. Writeto_csv_file(ip_frequency) function that accepts a dictionary list containing ip:frequency pair returned from count_ipfrequeny function and stores the IpV4 addresses with its frequency value into a ‘ipv4.csv’ file.

i. Which internal IP address is the most frequency found in the ‘syslog’ file ( hint: internal ip addresses start with either 10, 172, or 192)

ii. Which external Ip address is the most frequently found in the ‘syslog’ file

Example From File.

83.149.9.216 - - [17/May/2015:10:05:03 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-search.png HTTP/1.1" 200 203023 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:43 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-dashboard3.png HTTP/1.1" 200 171717 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:47 +0000] "GET /presentations/logstash-monitorama-2013/plugin/highlight/highlight.js HTTP/1.1" 200 26185 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:12 +0000] "GET /presentations/logstash-monitorama-2013/plugin/zoom-js/zoom.js HTTP/1.1" 200 7697 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:07 +0000] "GET /presentations/logstash-monitorama-2013/plugin/notes/notes.js HTTP/1.1" 200 2892 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:34 +0000] "GET /presentations/logstash-monitorama-2013/images/sad-medic.png HTTP/1.1" 200 430406 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:57 +0000] "GET /presentations/logstash-monitorama-2013/css/fonts/Roboto-Bold.ttf HTTP/1.1" 200 38720 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:50 +0000] "GET /presentations/logstash-monitorama-2013/css/fonts/Roboto-Regular.ttf HTTP/1.1" 200 41820 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:24 +0000] "GET /presentations/logstash-monitorama-2013/images/frontend-response-codes.png HTTP/1.1" 200 52878 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:50 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-dashboard.png HTTP/1.1" 200 321631 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:46 +0000] "GET /presentations/logstash-monitorama-2013/images/Dreamhost_logo.svg HTTP/1.1" 200 2126 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:11 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-dashboard2.png HTTP/1.1" 200 394967 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:19 +0000] "GET /presentations/logstash-monitorama-2013/images/apache-icon.gif HTTP/1.1" 200 8095 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:33 +0000] "GET /presentations/logstash-monitorama-2013/images/nagios-sms5.png HTTP/1.1" 200 78075 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:00 +0000] "GET /presentations/logstash-monitorama-2013/images/redis.png HTTP/1.1" 200 25230 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:25 +0000] "GET /presentations/logstash-monitorama-2013/images/elasticsearch.png HTTP/1.1" 200 8026 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:59 +0000] "GET /presentations/logstash-monitorama-2013/images/logstashbook.png HTTP/1.1" 200 54662 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:30 +0000] "GET /presentations/logstash-monitorama-2013/images/github-contributions.png HTTP/1.1" 200 34245 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:53 +0000] "GET /presentations/logstash-monitorama-2013/css/print/paper.css HTTP/1.1" 200 4254 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:24 +0000] "GET /presentations/logstash-monitorama-2013/images/1983_delorean_dmc-12-pic-38289.jpeg HTTP/1.1" 200 220562 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:54 +0000] "GET /presentations/logstash-monitorama-2013/images/simple-inputs-filters-outputs.jpg HTTP/1.1" 200 1168622 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:33 +0000] "GET /presentations/logstash-monitorama-2013/images/tiered-outputs-to-inputs.jpg HTTP/1.1" 200 1079983 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/May/2015:10:05:56 +0000] "GET /favicon.ico HTTP/1.1" 200 3638 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
24.236.252.67 - - [17/May/2015:10:05:40 +0000] "GET /favicon.ico HTTP/1.1" 200 3638 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0"

In: Computer Science

C++ Summary To make telephone numbers easier to remember, some companies use letters to show their...

C++

Summary

To make telephone numbers easier to remember, some companies use letters to show their telephone number. For example, using letters, the telephone number 438-5626 can be shown as GET LOAN.

In some cases, to make a telephone number meaningful, companies might use more than seven letters. For example, 225-5466 can be displayed as CALL HOME, which uses eight letters.

Instructions

Write a program that prompts the user to enter a telephone number expressed in letters and outputs the corresponding telephone number in digits.

If the user enters more than seven letters, then process only the first seven letters.

Also output the - (hyphen) after the third digit.

Allow the user to use both uppercase and lowercase letters as well as spaces between words.

Moreover, your program should process as many telephone numbers as the user wants.

Use the dialpad below for reference:

The program should accept input and produce output similar to the example program execution below.

Enter Y/y to convert a telephone number from
letters to digits.
Enter any other letter to terminate the program.
Y
Enter a telephone number using letters: Hello world

The corresponding telephone number is:
435-5696
To process another telephone number, enter Y/y
Enter any other letter to terminate the program.
z

In: Computer Science

c++ Create a one-dimension array, y, of this struct data type with a length 4. Pass...

c++

Create a one-dimension array, y, of this struct data type with a length 4. Pass y into a function: PrintArrayElement( …). Finish the interface of this function, and loop over each array element inside this function

In: Computer Science

You are a given an array of n elements, design an algorithm to find the minimum...

You are a given an array of n elements, design an algorithm to find the minimum element and the 2nd minimum element in the array using as few comparisons as possible.

For example, A[] can be [5, 6, 7, 3, 2, 1]. You should output 1 as minimum, 2 as 2nd minimum element in the array, and at the same time, minimize the number of comparisons used.


(i) describe the idea behind your algorithm in English
(ii) provide pseudocode
(iii) How many comparisons does your algorithm make?

In: Computer Science

system requiremnt specification about laundry system

system requiremnt specification about laundry system

In: Computer Science

You are a given an array of n elements, design an algorithm to find the minimum...

You are a given an array of n elements, design an algorithm to find the minimum element and the 2nd minimum element in the array using as few comparisons as possible.

For example, A[] can be [5, 6, 7, 3, 2, 1]. You should output 1 as minimum, 2 as 2nd minimum element in the array, and at the same time, minimize the number of comparisons used.


(i) describe the idea behind your algorithm in English
(ii) provide java code
(iii) How many comparisons does your algorithm make?

In: Computer Science

I have char memory[1024]. i want to write integer value of 300 into the memory. Type...

I have char memory[1024]. i want to write integer value of 300 into the memory. Type casting worked ok for all values 0-127. above that it looks like a garbage. could you write a function in c++ that will write an integer value say 300 into the memory. Thank you.

In: Computer Science