Would Go Writing Bodies Insert Deleteat Methods Q43888787

How would we go about writing the bodies of the insert anddeleteAt methods?
/** * This class provides a growable array for primitive long values * @author * @version 1.0 1/16/2020 */ class BigIntArrayList { //fields private long[] list; private int count; * Constructor. Initializes the underlying array to 10 elements. BigIntArrayList() { list = new long[10]; count = 0; * Inserts the given long value at the given index. The index is * assumed to be a value between 0 and count. Existing elements * are moved up as needed to make room for the new value. * @param index the index where the new value should be stored * @param value the value to be stored */ public void insert (int index, long value) { * Deletes the value at the given index. The index is * assumed to be a value between 0 and count – 1. Existing elements * are moved down as needed to keep all values contiguous, without * any empty spaces in the array. * @param index the index of the element that should be removed * @return the value that was removed public long deleteAt (int index) { return 0; Show transcribed image text /** * This class provides a growable array for primitive long values * @author * @version 1.0 1/16/2020 */ class BigIntArrayList { //fields private long[] list; private int count; * Constructor. Initializes the underlying array to 10 elements. BigIntArrayList() { list = new long[10]; count = 0; * Inserts the given long value at the given index. The index is * assumed to be a value between 0 and count. Existing elements * are moved up as needed to make room for the new value. * @param index the index where the new value should be stored * @param value the value to be stored */ public void insert (int index, long value) { * Deletes the value at the given index. The index is * assumed to be a value between 0 and count – 1. Existing elements * are moved down as needed to keep all values contiguous, without * any empty spaces in the array. * @param index the index of the element that should be removed * @return the value that was removed public long deleteAt (int index) { return 0;
Expert Answer
Answer to How would we go about writing the bodies of the insert and deleteAt methods?…
Would Input Formulas Given Numbers Using Python Part Shear Stress Normal Stress 20 Applied Q43897356
How would I input these formulas with given numbers usingpython?
Part A
The shear stress when a normal stress of 20 is applied to amaterial with cohesion 2 and angle of internal friction 35 degrees.using The Mohr-Coulomb Failure Criterion
part B
The scattering angle for maximum interference for light ofwavelength 7.5 x 10-7 hitting a crystalline lattice withplanes separated by a distance 1 x 10-6. using Bragg’sLaw
Expert Answer
Answer to How would I input these formulas with given numbers using python? Part A The shear stress when a normal stress of 20 is …
Would Like Know Excel Function Use Merge Identities Together Fill Missing Data Row Words W Q43883583
I would like to know which Excel function to use to mergeidentities together to fill missing data in the row. In otherwords, I would like to take the following 4 rows:

And end up with 2 consolidated rows like this:

What formula can I use to do this? The combined “fruit” and“initial” identities are what need to be matched against eachother, and then “color” and “quantity” need to be merged. Thanks inadvance for any help and advice!
A 4 Fruit Initial Color Quantity 5 Apples 6 Bananas 7 Apples Red Yellow B A 8 Bananas B 10 A Initial Color Quantity 4 Fruit 5 Apples 6 Bananas B Red A 2 Yellow Show transcribed image text A 4 Fruit Initial Color Quantity 5 Apples 6 Bananas 7 Apples Red Yellow B A 8 Bananas B 10
A Initial Color Quantity 4 Fruit 5 Apples 6 Bananas B Red A 2 Yellow
Expert Answer
Answer to I would like to know which Excel function to use to merge identities together to fill missing data in the row. In other …
Would Like Know Excel Function Use Merge Identities Together Fill Missing Data Words Would Q43882564
I would like to know which Excel function to use to mergeidentities together to fill missing data. In other words I wouldlike to take the following 4 rows:

And end up with 2 consolidated rows like this:

What formula can I use to do this? The combined “fruit” and“initial” identities are what need to be matched against eachother, and then “color” and “quantity” need to be merged. Thanks inadvance for any help and advice!
D Quantity A B 4 Fruit Initial 5 Apples A 6 Bananas B 7 Apples A 8 Bananas B C Color Red Yellow Quantity 4 Fruit Initial 5 Apples A 6 Bananas B Color Red Yellow 8 Show transcribed image text D Quantity A B 4 Fruit Initial 5 Apples A 6 Bananas B 7 Apples A 8 Bananas B C Color Red Yellow
Quantity 4 Fruit Initial 5 Apples A 6 Bananas B Color Red Yellow 8
Expert Answer
Answer to I would like to know which Excel function to use to merge identities together to fill missing data. In other words I wou…
Would Like Output Match Correct Output See Someone Fix Code Maincpp Altered Eventcpp Modi Q43902903
I would like my output to match the correct output(see below).Can someone fix the code? main.cpp should not not be altered. onlyevent.cpp should be modified.
.This is my output:
Command Line:
1: ws
2: monday.txt
3: tuesday.txt
——————–
Day 1
——————–
1. 00:02:55 -> Computer Starting
2. 00:02:55 -> Computer Starting
3. [ No Event ]
4. 01:15:34 -> User logging in
5. 01:20:09 -> User logging in
6. [ No Event ]
7. [ No Event ]
——————–
Day 2
——————–
8. [ No Event ]
9. [ No Event ]
10. 01:20:34 -> User take a break
11. 01:22:30 -> User plays sudoku
12. [ No Event ]
——————–
Archive
——————–
13. [ No Event ]
14. 01:20:00 -> User logging in
15. [ No Event ]
16. [ No Event ]
17. [ No Event ]
18. [ No Event ]
19. [ No Event ]
20. [ No Event ]
21. [ No Event ]
——————–
*** Error in `ws’: double free or corruption (fasttop):0x0000000001a16310 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81609)[0x7f716d27c609]
ws[0x4012c3]
ws[0x401736]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f716d21d495]
ws[0x400ec9]
======= Memory map: ========
00400000-00402000 r-xp 00000000 00:28 1077143745/home/mmaahi/ws
00601000-00602000 r–p 00001000 00:28 1077143745/home/mmaahi/ws
00602000-00603000 rw-p 00002000 00:28 1077143745/home/mmaahi/ws
01a14000-01a35000 rw-p 00000000 00:00 0 [heap]
7f7168000000-7f7168021000 rw-p 00000000 00:00 0
7f7168021000-7f716c000000 —p 00000000 00:00 0
7f716d1fb000-7f716d3bd000 r-xp 00000000 fd:00 674/usr/lib64/libc-2.17.so
7f716d3bd000-7f716d5bd000 —p 001c2000 fd:00 674/usr/lib64/libc-2.17.so
7f716d5bd000-7f716d5c1000 r–p 001c2000 fd:00 674/usr/lib64/libc-2.17.so
7f716d5c1000-7f716d5c3000 rw-p 001c6000 fd:00 674/usr/lib64/libc-2.17.so
7f716d5c3000-7f716d5c8000 rw-p 00000000 00:00 0
7f716d5c8000-7f716d5dd000 r-xp 00000000 fd:00 31805/usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f716d5dd000-7f716d7dc000 —p 00015000 fd:00 31805/usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f716d7dc000-7f716d7dd000 r–p 00014000 fd:00 31805/usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f716d7dd000-7f716d7de000 rw-p 00015000 fd:00 31805/usr/lib64/libgcc_s-4.8.5-20150702.so.1
7f716d7de000-7f716d8df000 r-xp 00000000 fd:00 682/usr/lib64/libm-2.17.so
7f716d8df000-7f716dade000 —p 00101000 fd:00 682/usr/lib64/libm-2.17.so
7f716dade000-7f716dadf000 r–p 00100000 fd:00 682/usr/lib64/libm-2.17.so
7f716dadf000-7f716dae0000 rw-p 00101000 fd:00 682/usr/lib64/libm-2.17.so
7f716dae0000-7f716dbc9000 r-xp 00000000 fd:00 33767/usr/lib64/libstdc++.so.6.0.19
7f716dbc9000-7f716ddc8000 —p 000e9000 fd:00 33767/usr/lib64/libstdc++.so.6.0.19
7f716ddc8000-7f716ddd0000 r–p 000e8000 fd:00 33767/usr/lib64/libstdc++.so.6.0.19
7f716ddd0000-7f716ddd2000 rw-p 000f0000 fd:00 33767/usr/lib64/libstdc++.so.6.0.19
7f716ddd2000-7f716dde7000 rw-p 00000000 00:00 0
7f716dde7000-7f716de09000 r-xp 00000000 fd:00 667/usr/lib64/ld-2.17.so
7f716dfef000-7f716dff4000 rw-p 00000000 00:00 0
7f716e005000-7f716e008000 rw-p 00000000 00:00 0
7f716e008000-7f716e009000 r–p 00021000 fd:00 667/usr/lib64/ld-2.17.so
7f716e009000-7f716e00a000 rw-p 00022000 fd:00 667/usr/lib64/ld-2.17.so
7f716e00a000-7f716e00b000 rw-p 00000000 00:00 0
7fffd3449000-7fffd346a000 rw-p 00000000 00:00 0 [stack]
7fffd352b000-7fffd352d000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0[vsyscall]
Script done on Sat 18 Jan 2020 03:39:09 PM EST
This is the correct output:
Command Line:
1: ws
2: monday.txt
3: tuesday.txt
——————–
Day 1
——————–
1. 00:02:55 -> Computer Starting
2. 00:02:55 -> Computer Starting
3. [ No Event ]
4. 01:15:34 -> User logging in
5. 01:20:09 -> User logging in
6. 09:01:04 -> Browser closed
7. 17:33:33 -> User checks email
——————–
Day 2
——————–
8. 01:02:23 -> User starts working on homework
9. [ No Event ]
10. 01:20:34 -> User take a break
11. 01:22:30 -> User plays sudoku
12. 01:26:40 -> User resumes homework
Archive
——————–
13. [ No Event ]
14. 01:20:00 -> Authentication Failed
15. 01:23:20 -> Browser starts
16. 09:01:04 -> Browser closed
17. 17:33:33 -> User checks email
18. 01:02:23 -> User starts working on homework
19. 01:22:30 -> User plays sudoku
20. [ No Event ]
21. 01:26:40 -> User resumes homework
//EVENT.CPP
unsigned int g_sysClock = 0;
namespacesdds
{
//constructor
Event::Event() {
secMidnight = 0;
description=nullptr;
}
void Event::display() {
static int counter = 1;
int hour = 0;
int min = 0;
int sec = 0;
hour = secMidnight /3600;
min = (secMidnight – (hour *3600)) / 60;
sec = (secMidnight – (hour *3600) – (min * 60));
cout << setw(3)<< setfill(‘ ‘) << counter++ << “. “;
if ( description!=nullptr&& description[0] != ‘ ‘) {
cout<< setw(2) << setfill(‘0’) << hour << “:”<< setw(2) << setfill(‘0’) << min << “:”<< setw(2) << setfill(‘0’) << sec << “-> ” << description << endl;
// cout <<“[ No Event ]” << endl;
}
else {
cout<< “[ No Event ]” << endl;
}
void Event::setDescription(const char *src){
if (src != nullptr &&src[0]!=’ ‘) {
description = new char[strlen(src)+1];
strcpy(description, src);
secMidnight = g_sysClock;
}
else {
description = nullptr;
}
}
Event::~Event() {
delete[] description;
}
main.cpp
int main(int argc, char** argv) {
std::cout << “Command Line:n”;
for (int i = 0; i < argc; ++i) {
std::cout << i+1 <<“: ” << argv[i] << “n”;
}
std::cout << std::endl
sdds::Event archive[10];
size_t idxArchive = 0;
sdds::Event currentEvent;
const size_t secInDay = 60u * 60u * 24u;
for (auto day = 1; day < argc; ++day)
{
// each parameter for anapplication contains the events from one day
// process each one
std::cout <<“——————–n”;
std::cout << ” Day ” <<day << ‘n’;
std::cout <<“——————–n”;
std::ifstream in(argv[day]);
char opcode = ‘ ‘;
size_t time = secInDay + 1;
in >> opcode >>time;
// starting at midnight, untilthe end of the day
for (::g_sysClock = 0u;::g_sysClock < secInDay; ::g_sysClock++)
{
// what shouldhappen this second
while (time ==::g_sysClock)
{
// skip the delimiter
in.ignore();
// read the next opcode
in >> opcode;
// end of the file
if (in.fail())
break;
// handle the operation code
switch (opcode)
{
case ‘T’: // a new time code, this is exit thewhile loop
in >> time;
break;
case ‘S’: // start a new event, the old event isautomatically finished
char buffer[1024];
in.get(buffer, 1024,’,’);
currentEvent.setDescription(buffer);
break;
case ‘E’: // end the current event
currentEvent.setDescription(nullptr);
break;
case ‘P’: // print to scren the informationabout the current event
currentEvent.display();
break;
case ‘A’: // add a copy of the current event tothe archive
sdds::Eventcopy(currentEvent);
archive[idxArchive++] =copy;
break;
}
}
}
}
std::cout << “——————–n”;
std::cout << ” Archiven”;
std::cout << “——————–n”;
for (auto i = 0u; i < idxArchive; ++i)
archive[i].display();
std::cout << “——————–n”;
}
Expert Answer
Answer to I would like my output to match the correct output(see below). Can someone fix the code? main.cpp should not not be alte…
Would Like Print Testarray Elements 3 Elements One Line Result Like 7 12 1 0 5 8 However C Q43811675
Iwould like to print testArray elements up to 3 elements in one lineResult should be like7 12 10 5 8
However the closest result that I get is7 12 1 10 5 8
or
7 12 1 00 5 8
How can I manage to print array elements in differentlines
JAVA on Eclipse IDE
Refactor Navigate Search Project Run Window Help eclipse-workspace-workspace/src/workspace/lab3_001.java – Eclipse IDE – : Java Java Virtual Machi module-Info… Arrays Pack.java Dlab5.java 2 6 3.001.java 1 package workspace; import java.util.Arrays; 5 public class tab3001 70 public static void printArray(int[] arr, int no) { public static void main(String[] args) { // TODO Auto-generated method stub int testArray = 7, 12, 1, 0, 5, 8) intl emptyArray=0); int il anotherArray: printArray(testArray, 3), Probleme carminated Care 001 A r rivali -13.01. Contaminavea 2020 2 MacBook Pro Show transcribed image text Refactor Navigate Search Project Run Window Help eclipse-workspace-workspace/src/workspace/lab3_001.java – Eclipse IDE – : Java Java Virtual Machi module-Info… Arrays Pack.java Dlab5.java 2 6 3.001.java 1 package workspace; import java.util.Arrays; 5 public class tab3001 70 public static void printArray(int[] arr, int no) { public static void main(String[] args) { // TODO Auto-generated method stub int testArray = 7, 12, 1, 0, 5, 8) intl emptyArray=0); int il anotherArray: printArray(testArray, 3), Probleme carminated Care 001 A r rivali -13.01. Contaminavea 2020 2 MacBook Pro
Expert Answer
Answer to I would like to print testArray elements up to 3 elements in one lineResult should be like7 12 10 5 8However the closest…
Would Like Sort Data Column J Match Data Column Items Column J Event Match Simply Skips R Q43877704
I would like to sort data in column J to match the data inColumn A. I have more items in the A column than J so in the eventthere is no match it simply skips that row until there is a match.At the end I would be able to compare the tier (column B) and value(column M) of a single item number.

G H 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 – A B 1004001 Tier A 1005004 Tier C 1005048 Tier C 1005059 Tier C 1005706 Tier A 1006506 Tier C 1006801 Tier A 1008501 Tier B 1009005 Tier A 1009038 Tier B 1009049 Tier B 1009107 Tier C 1009479 Tier D 1009480 Tier B 1009901 Tier C 1009923 Tier B 1009978 Tier 1010022 Tier C 1010081 Tier D C D Units GC Units CHM Units CHM Units CHM Units BIO Units CHM GC Units CHM Units CHM Units CHM Public He: CHM Units DSHM Units FI Public He: CHM Units EXC Units EXC Units DSHM Units DSHM Units DSHM E F Melting Point Ophthamology Ophthamology Ophthamology Performance Standards Renal Residual Solvents Ophthamology Hepatic Hepatic Hepatic Amino Acids Flavors & Fragrances Oncology Coatings Coatings Amino Acids DSHM Others Amino Acids . K . L 1005004 A1-C25-SO1-RM 1005048 A1-C29-SO3-LO 1005059 R4-D13-04-LM 1005706 A1-B02-501- 1006506 A1-B29-505- 1006801 A1-B05-SO3- 1008501 R1-D18-S06-LO 1009005 R1-D06-SO1-RO 1009479 A2-E02-SO2-LO 1009901 A1-B13-501- 1009923 A1-B15-S05- 1009978 A1-C29-SO2-RM 1010022 A1-C26-SO1-RO 1010081 A1-C31-SO2-LM 1010106 R1-D38-SO3-RO 1010208 R4-D34-SO1-LO 1011007 R1-D12-S06-LO 1011018 R1-D40-SO5-RO 1011029 R5-B22-SO3- . M I $3,697.02 $324.27 $415.80 $4,481.71 $43.80 $3,509.22 $160.00 $848.00 $0.00 $377.54 $766.21 $91.20 $243.04 $10.17 $67.86 $171.10 $5,132.81 $838.04 $718.17 Show transcribed image text G H 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 – A B 1004001 Tier A 1005004 Tier C 1005048 Tier C 1005059 Tier C 1005706 Tier A 1006506 Tier C 1006801 Tier A 1008501 Tier B 1009005 Tier A 1009038 Tier B 1009049 Tier B 1009107 Tier C 1009479 Tier D 1009480 Tier B 1009901 Tier C 1009923 Tier B 1009978 Tier 1010022 Tier C 1010081 Tier D C D Units GC Units CHM Units CHM Units CHM Units BIO Units CHM GC Units CHM Units CHM Units CHM Public He: CHM Units DSHM Units FI Public He: CHM Units EXC Units EXC Units DSHM Units DSHM Units DSHM E F Melting Point Ophthamology Ophthamology Ophthamology Performance Standards Renal Residual Solvents Ophthamology Hepatic Hepatic Hepatic Amino Acids Flavors & Fragrances Oncology Coatings Coatings Amino Acids DSHM Others Amino Acids . K . L 1005004 A1-C25-SO1-RM 1005048 A1-C29-SO3-LO 1005059 R4-D13-04-LM 1005706 A1-B02-501- 1006506 A1-B29-505- 1006801 A1-B05-SO3- 1008501 R1-D18-S06-LO 1009005 R1-D06-SO1-RO 1009479 A2-E02-SO2-LO 1009901 A1-B13-501- 1009923 A1-B15-S05- 1009978 A1-C29-SO2-RM 1010022 A1-C26-SO1-RO 1010081 A1-C31-SO2-LM 1010106 R1-D38-SO3-RO 1010208 R4-D34-SO1-LO 1011007 R1-D12-S06-LO 1011018 R1-D40-SO5-RO 1011029 R5-B22-SO3- . M I $3,697.02 $324.27 $415.80 $4,481.71 $43.80 $3,509.22 $160.00 $848.00 $0.00 $377.54 $766.21 $91.20 $243.04 $10.17 $67.86 $171.10 $5,132.81 $838.04 $718.17
Expert Answer
Answer to I would like to sort data in column J to match the data in Column A. I have more items in the A column than J so in the …
Would Output Print Format 10005555 2f Q43840195
what would be the output: print(format(1000.5555,’,.2f))
Expert Answer
Answer to what would be the output: print(format(1000.5555,’,.2f))…
Would Someone Able Break C Code Line Line Tell Line Means Void Printallbooks String Titles Q43794681
Would someone be able to break this C++ code down line by lineand tell me what each line means?
void printAllBooks(string titles[],string authors[],intnumBookStored){
if(numBookStored<1){
cout<<“No books are stored”<<endl;
return ;
}
cout<<“Here is a list of books”<<endl;
int i;
for(i=0;i<numBookStored;i++)cout<<titles[i]<<” by”<<authors[i]<<endl;
}
Expert Answer
Answer to Would someone be able to break this C++ code down line by line and tell me what each line means? void printAllBooks(stri…
Would Someone Able Break C Code Line Line Tell Line Means Void Printbooksbyauthor Std Stri Q43794685
Would someone be able to break this C++ code down line by lineand tell me what each line means?
void printBooksByAuthor(std::string titles[], std::stringauthors[], int numBooks, std::string author)
{
if (numBooks == 0)
{
std::cout << “No books are stored” << std::endl;
return;
}
bool bIsBookFound = false;
std::string* foundBooks = new std::string[numBooks];
int cnt = 0;
for (int i = 0;i < numBooks;i++)
{
if (authors[i] == author)
{
foundBooks[cnt] = titles[i];
cnt++;
bIsBookFound = true;
}
}
if(bIsBookFound)
{
std::cout << “Here is a list of books by ” << author<< std::endl;
for (int i = 0;i < cnt;i++)
std::cout << foundBooks[i] << std::endl;
}
else
{
std::cout << “There are no books by ” << author;
}
delete[] foundBooks;
}
Expert Answer
Answer to Would someone be able to break this C++ code down line by line and tell me what each line means? void printBooksByAuthor…