Untitled document 1. Source code (one or more files) each one containing a comment with your name, course code and date. Source code should have functions defined and implemented, with comments...

1 answer below »
d


Untitled document 1. Source code (one or more files) each one containing a comment with your name, course code and date. Source code should have functions defined and implemented, with comments indicating the input/processing/output. Classes can be used and encouraged to use. You can start with sample code and add to it. A satisfactory measure is that 20% of new code should be added to the original code. Must add a comment specifying the source of the original code. 2. Documentation. Describe the operation of the program to a user, like a user manual. If the program is interactive, documentation should include screenshots and the input required and output expected. If the program is batch processing, documentation should describe the inputs required (if any) and output expected. The goal is to provide this document to a novice user so that they know how to use the program without any questions.
Answered 2 days AfterJul 25, 2021

Answer To: Untitled document 1. Source code (one or more files) each one containing a comment with your name,...

Karthi answered on Jul 28 2021
135 Votes
cpp/flo.jpg
cpp/README.md
## There are totally 3 scripts in the document
## Each of them displays different features from others.
#
# 1solution.cpp
## Reads a csv file and displays a Restaurant Menu. Then asks users what to order in a numeric way.
## Once the person selects all the items, the program will split the amount by number of customers.
## This program also takes multiple orders and calculates all the order total once the program ends.
## To run this file, use following command:

## Compile first,
## --> g++ 1solution.cp
## --> ./a.out
#
# 2file.cpp
## In this script user can input the values asked in the field. Once everything are answered, then they will be stored in txt file.
## To run this file, use following command:
## Compile first,
## --> g++ 2file.cp
## --> ./a.out
#
# 3image.cpp
## Open and displays an image using opencv library.
# Here I will provide instructions to install opencv in ubuntu 18.04
### --> sudo apt-get update
### --> sudo apt-get upgrade -y
### --> sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
### --> sudo apt-get install python3-dev python3-numpy libtbb2 libtbb-dev
### --> sudo apt-get install libjpeg-dev libpng-dev libtiff5-dev libjasper-dev libdc1394-22-dev libeigen3-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev sphinx-common libtbb-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libopenexr-dev libgstreamer-plugins-base1.0-dev libavutil-dev libavfilter-dev libavresample-dev
### --> sudo su
### --> cd /opt
### --> git clone https://github.com/Itseez/opencv.git
### --> git clone https://github.com/Itseez/opencv_contrib.git
### --> cd opencv
### --> mkdir release
### --> cd release
### --> cmake -D BUILD_TIFF=ON -D WITH_CUDA=OFF -D ENABLE_AVX=OFF -D WITH_OPENGL=OFF -D WITH_OPENCL=OFF -D WITH_IPP=OFF -D WITH_TBB=ON -D BUILD_TBB=ON -D WITH_EIGEN=OFF -D WITH_V4L=OFF -D WITH_VTK=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv_contrib/modules /opt/opencv/
### --> make -j4
### --> make install
### --> ldconfig
### --> exit
### --> cd ~
### --> pkg-config --modversion opencv
## To run this file, use following command:
## Compile first,
## --> g++ 3image.cpp -o output 'pkg-config --cflags --libs opencv'
## --> ./output
cpp/2file.cpp
#include
#include
using namespace std;
struct student
{
char name[50];
int roll;
float marks;
};
int main()
{
fstream my_file;
    my_file.open("details.txt", ios::out);
    if (!my_file) {
        cout << "File not created!";
    }
    else {
        cout << "File created successfully!";
    }
student s;
cout << "Enter information," << endl;
cout << "Enter name: ";
cin >> s.name;
cout << "Enter roll number: ";
cin >> s.roll;
cout << "Enter marks: ";
cin >> s.marks;
cout << "\nDisplaying Information," << endl;
cout << "Name: " << s.name << endl;
my_file << "Name: " << s.name << '\n';
cout << "Roll: " << s.roll << endl;
my_file << "Roll: " << s.roll << '\n';
cout << "Marks: " << s.marks << endl;
my_file << "Marks: " << s.marks << '\n';
return 0;
}
cpp/a.out
cpp/details.txt
cpp/3image.cpp
#include
#include
using namespace cv;
int main()
{
Mat im = imread("flo.jpg", CV_LOAD_IMAGE_COLOR);
namedWindow("image");
imshow("image", im);
waitKey(0);
}
cpp/menu-0c2enziu.csv
Serial #,Name,Price
1,Salad,8.99
2,Fried rice,12.99
3,Noodle soup,10
4,Beef noodle soup,15.99
5,Century egg pork lean congee,8.99
6,Sea food congee,12.99
7,Peking duck,52.99
8,BBQ meat,15.99
9,BBQ duck,19.99
10,lettuce with soy souce,12.99
11,Broccoli with oyster sauce Sweet and Sour Pork,12.99
12,Sweet and Sour Pork,21.99
13,Braised beef,26.99
14,Braised pork,21.99
15,Braised fish,36.99
16,steamed fish,32.99
17,Spicy crab,56.99
18,Chef’s daily soup,6.99
19,Hot and sour soup,8.99
20,Seafood tofu soup,12.99
cpp/1solution.cpp
#include
#include
#include
#include
#include
using namespace std;
string Serial;
string Name;
string Price;
int customer_number;
int quantity;
string answer;
string response;
// Total of Individual items and Grand Total
float total;
float individual_total;
float total_salad;
float total_fried_rice;
float total_noodle_soup;
float total_beef_noodle_soup;
float total_century_egg_pork_lean_congee;
float total_sea_food_congee;
float total_peking_duck;
float total_bbq_duck;
float total_lettuce_with_soy_sauce;
float total_broccoli_with_oyester_sauce_sweet_sour_pork;
float total_sweet_and_sour_pork;
float total_braised_beef;
float total_braised_pork;
float total_braised_fish;
float total_steamed_fish;
float total_spicy_crab;
float total_chefs_daily_soup;
float total_hot_and_sour_soup;
float...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here