Write a C++ program that reads the number of sales (as integer values) at the end of each month for the ABC Supermarket of 5 departments (grocery, bakery, meat, vegetables, and electronics). The program reads all data from the input file sales.txt. The first line has an integer value N that represents the number of months to be processed. The following N input lines contain the name of the month followed by the sales of each department in that month (5 integer values).
Your program shall produce a nice report in a file report.txt showing the list of months and the sum of 5 sales for that month. The program will also output the total sum of all sales and the average sales per month. Format your output to produce an exact result as in the sample below. To output the # use setw(3), to output the month name use setw(6) and use setw(12) to output the sum of sales for the month. The final output should be limited to 2 decimal places.
Questions:
1.Would you be able to make use of this knowledge obtained in this module? In what scenario would it be? About the 5S Principle.
2.Will you apply it personality or in the future when you are already working for a company?What scenario that would be? About the 5S Principles.
Test that array with both selection sort and bubble sort.Compute the time taken for each algorithm to complete.Repeat step two and three for 1000, 10000, 100000, and 1000000 random numbers.Plot the results in a graph
Write Java code for implementing arrays that accepts user inputs and then displays them. Take different arrays like this: stringArray, integerArray, doubleArray.
(a) Write Java code for implementing arrays that accepts user inputs and then displays them. Take different arrays like this: stringArray, integerArray, doubleArray.
Suppose you want to find roots of a quadratic equation ax2+bx+c=0 where a, b and c are coefficients.
This program will ask the coefficients: a, b and c from user and displays the roots.Write a C# program to allow a user to guess a number( from 1 to 6) that will be randomly generated by computer.
The user is asked to input his/her number. Then the number will be compared with the random number. See the example below:
Enter your number: 2
You lost.Write a base class Computer that contains data members of wordsize(in bits),
memorysize (in megabytes), storagesize (in megabytes) and speed (in megahertz).
Derive a Laptop class that is a kind of computer but also specifies the object’s length,
width, height, and weight. Member functions for both classes should include a default
constructor, a constructor to inialize all components and a function to display data
members.
Write a class Person that has attributes of id, name and address. It has a constructor to
initialize, a member function to input and a member function to display data members.
Create another class Student that inherits Person class. It has additional attributes of
rollnumber and marks. It also has member function to input and display its data
members.
Write a program having a base class Student with data members rollno, name and
Class define a member functions getdata() to input values and another function
putdata() to display all values. A class Test is derived from class Student with data
members T1marks, T2marks, T3marks, Sessional1, Sessional2, Assignment and Final.
Also make a function getmarks() to enter marks for all variables except Final and also
make a function putmarks() to display result. Make a function Finalresult() to
calculate value for final variable using other marks. Then display the student result
along with student data.