Programming Homework Help

BTE 320 University of Miami C++ Program Computer Programming Task

 

Finish the question to output the same result as appleoutput.txt.

quiz5
question 2

Problem
=======
Apple Inc. is pulling off a feat rarely seen in any industry, much less the cutthroat world of consumer electronics: 
gaining market share while also commanding higher prices.
Led by the even more advanced features of iPhones it keeps introducting, and Apple’s management is now committed to 
analyzing sales even further to track how products are performing in different locations and even at different times 
of the year. 
The Apple regional offices report their monthly sales to Apple’s Headquarters who want to track the sales 
of each product for different periods at each location and sum it up 
in different ways. Apple will pull all sales data from different stores, and already have programs that summarize 
the data for each product per location per month. 
But they want more. They ask you to design an in memory cube that would take the numbers summarized at this level, 
and just do a quick POC (Proof Of Concept) that you could expand on later with more dimensions and with real 
transactional fact  data. 

The problem is that you have only half an hour before your meeting with Tim Cook. 
You must show him something. The VP for sales contacts you and gives you the following example of data, 
and example of output they would like to see, and asks you to use this sample for the POC demo. 
You must write code to make this happen. He even gives another exciting piece of information that 
Tim Cook thinks that Apple should have a product that would help people define multi dimensional 
data structures for analytical purposes – 
he thinks that in this day and age of Analytics and Big Data, Apple must compete with others who already have products to design those types of data structures (He sees no reason why apple should not add a cube design component 
and even a multi dimensional query language to some of their new acquisitions such as Foundation DB). 
You wonder to yourself: Hmmmm!!!…is he trying to compete with Microsoft Analysis Services in their MS SQL Server 
Product? You will think about this later, but right now, you have very little time, and you start thinking with your
immediate manager of what you will demo. He had thought some of it through, though, but he wants you to finish it 
before the demo.
Here is what your manager gives you (numbers should be in millions really), and asks  you to complete some of it 
while his other intern works on some of the easier functions.
YOUR TASK IS TO WRITE FUNCTIONS 1,4,5,6 and 7,8 (5 points each). I did 2,3 for you as a guide.

Produce a file similar to appleoutput.txt, but it does not have to be exact format. But something
that looks nice.
Submission
==========

Don't change main
Complete the functions that you need to complete. The loops is what you need to do.

Compile your code

g++ quiz5q2.cpp -o q5q2
./q5q2 > myapplecube.txt

submit your quiz5q2.cpp and your myapplecube.txt
*/

#include <iostream>
#include <string>
#include <iomanip>

using namespace std;

int const LOCATION_DIM_SZ = 2;
int const TIME_DIM_SZ= 2;
int const PRODUCT_DIM_SIZE= 3;

string Location[]  = {"FL", "TX"};
string Period[]   = {"Jan", "FEB"};
string Product[]   = {"iPhone","iPad","MacBookPro"};
/*1*/
void printSalesDetails(double sales[LOCATION_DIM_SZ][TIME_DIM_SZ][PRODUCT_DIM_SIZE]){
    
    int i(0),j(0),k(0);
    int sum =0;
    
    cout<<"Sales Details per Location per Period per Product" <<endl;
    cout<<"================================================="<<endl;
    for 
        
        for 
            
            for 
                
               
                
                
            }
        }
        
    }
    
    cout<<"==================================================="<<endl;
    

}

/*2*/
void printSalesByProduct(double sales[LOCATION_DIM_SZ][TIME_DIM_SZ][PRODUCT_DIM_SIZE]){
    
    int i(0),j(0),k(0);
    double salesPerProduct=0;
    
    cout<<"Sales per Product" <<endl;
    cout<<"================="<<endl;
    for (i=0; i<3;i++){  //product
        salesPerProduct = 0;
        for (j=0 ; j<2;j++){ //location
            
            for (k=0; k<2;k++){ //period
                
                salesPerProduct += sales[j][k][i];
                
            }
        }
        
        cout << "Total Sales for " <<setw(20)<<setfill(' ')<<left<< Product[i] << "t=$" <<setw(9)<<setfill(' ')<<right<<fixed<<salesPerProduct<<setw(10)<<setfill(' ')<<left<<"tmillions"<<endl;
        
    }
    
    
    cout<<endl;
    cout<<"==================================================="<<endl;
    
    
}

/*3*/
void printSalesByLocation(double sales[LOCATION_DIM_SZ][TIME_DIM_SZ][PRODUCT_DIM_SIZE]){
    
    int i(0),j(0),k(0);
    double salesPerLocation=0;
    
    cout<<"Sales per Location" <<endl;
    cout<<"================="<<endl;
    
    
    for (i=0; i<2;i++){  //location
        salesPerLocation = 0;
        for (j=0 ; j<2;j++){ //period
            
            for (k=0; k<3;k++){ //product
                
                salesPerLocation += sales[i][j][k];
                
            }
        }
        
        cout << "Total Sales for " <<setw(20)<<setfill(' ')<<left<< Location[i] << "t=$" <<setw(9)<<setfill(' ')<<right<<fixed<< salesPerLocation<<setw(10)<<setfill(' ')<<left<<"tmillions"<<endl;
        
        
        
    }
    
    
    cout<<endl;
    cout<<"==================================================="<<endl;
    
    
}

/*4*/
void printSalesByPeriod(double sales[LOCATION_DIM_SZ][TIME_DIM_SZ][PRODUCT_DIM_SIZE]){
    int i(0),j(0),k(0);
    double salesPerPeriod=0;
    
    cout<<"Sales per Period" <<endl;
    cout<<"================="<<endl;
    
   
    
    cout<<endl;
    cout<<"==================================================="<<endl;

    
}
/*5*/
void printSalesPerProductPerLocation(double sales[LOCATION_DIM_SZ][TIME_DIM_SZ][PRODUCT_DIM_SIZE]){
    
    int i(0),j(0),k(0);
    double salesPerProductPerLocation=0;
    
    cout<<"Total Sales per Product per Location" <<endl;
    cout<<"===================================="<<endl;
    
    
   
    
    cout<<endl;
    cout<<"==================================================="<<endl;
    
    
}

/*6*/
void printSalesPerProductPerPeriod(double sales[LOCATION_DIM_SZ][TIME_DIM_SZ][PRODUCT_DIM_SIZE]){
    
    int i(0),j(0),k(0);
    double salesPerProductPerPeriod=0;

    
    cout<<"Total Sales per Product per Period" <<endl;
    cout<<"===================================="<<endl;
    
    
    
    cout<<endl;
    cout<<"==================================================="<<endl;
    
}

/*7*/
void printSalesPerLocationPerPeriod(double sales[LOCATION_DIM_SZ][TIME_DIM_SZ][PRODUCT_DIM_SIZE]){
    
    int i(0),j(0),k(0);
    double salesPerLocationPerPeriod=0;
    
    
    cout<<"Total Sales per Location per Period" <<endl;
    cout<<"===================================="<<endl;
    
    
   
        
        
    cout<<endl;
    cout<<"==================================================="<<endl;

    
}

/*8*/
void printSalesPerPeriodPerLocation(double sales[LOCATION_DIM_SZ][TIME_DIM_SZ][PRODUCT_DIM_SIZE]){
    
    int i(0),j(0),k(0);
    double salesPerPeriodPerLocation=0;

    cout<<"Total Sales per Period per Location" <<endl;
    cout<<"===================================="<<endl;
    
    
    
   
    
    cout<<endl;
    cout<<"==================================================="<<endl;
    
    

    
    
}
int main(int argc, const char * argv[]) {
    
    
    double sales[LOCATION_DIM_SZ][TIME_DIM_SZ][PRODUCT_DIM_SIZE]={0};
    
    
    
    sales[0][0][0]=45;
    sales[0][0][1]=8;
    sales[0][0][2]=4;
    sales[0][1][0]=35;
    sales[0][1][1]=10;
    sales[0][1][2]=5;
    sales[1][0][0]=75;
    sales[1][0][1]=15;
    sales[1][0][2]=13;
    sales[1][1][0]=45;
    sales[1][1][1]=17;
    sales[1][1][2]=23.1;
    
    
    printSalesDetails(sales);                       /* 1 */
    printSalesByProduct(sales);                     /* 2 */
    printSalesByLocation(sales);                    /* 3 */
    printSalesByPeriod(sales);                      /* 4 */
    printSalesPerProductPerLocation(sales);         /* 5 */
    printSalesPerProductPerPeriod(sales);           /* 6 */
    printSalesPerLocationPerPeriod(sales);          /* 7 */
    printSalesPerPeriodPerLocation(sales);          /* 8 */

    return 0; 
}
appleoutput.txt:

Sales Details per Location per Period per Product
=================================================
sales for Location FL/Jan/iPhone       	=$    45.00	millions 
sales for Location FL/Jan/iPad         	=$     8.00	millions 
sales for Location FL/Jan/MacBookPro   	=$     4.00	millions 
sales for Location FL/FEB/iPhone       	=$    35.00	millions 
sales for Location FL/FEB/iPad         	=$    10.00	millions 
sales for Location FL/FEB/MacBookPro   	=$     5.00	millions 
sales for Location TX/Jan/iPhone       	=$    75.00	millions 
sales for Location TX/Jan/iPad         	=$    15.00	millions 
sales for Location TX/Jan/MacBookPro   	=$    13.00	millions 
sales for Location TX/FEB/iPhone       	=$    45.00	millions 
sales for Location TX/FEB/iPad         	=$    17.00	millions 
sales for Location TX/FEB/MacBookPro   	=$    23.10	millions 

Sum of Sales for all Apple              =$      295	millions 

===================================================
Sales per Product
=================
Total Sales for iPhone              	=$   200.00	millions 
Total Sales for iPad                	=$    50.00	millions 
Total Sales for MacBookPro          	=$    45.10	millions 

===================================================
Sales per Location
=================
Total Sales for FL                  	=$   107.00	millions 
Total Sales for TX                  	=$   188.10	millions 

===================================================
Sales per Period
=================
Total Sales for Jan               	=$160.00   	millions 
Total Sales for FEB               	=$135.10   	millions 

===================================================
Total Sales per Product per Location
====================================
Total Sales for	iPhone              in	FL     	=$    80.00	millions 
Total Sales for	iPhone              in	TX     	=$   120.00	millions 
Total Sales for	iPad                in	FL     	=$    18.00	millions 
Total Sales for	iPad                in	TX     	=$    32.00	millions 
Total Sales for	MacBookPro          in	FL     	=$     9.00	millions 
Total Sales for	MacBookPro          in	TX     	=$    36.10	millions 

===================================================
Total Sales per Product per Period
====================================
Total Sales for	iPhone              in	Jan    	=$   120.00	millions 
Total Sales for	iPhone              in	FEB    	=$    80.00	millions 
Total Sales for	iPad                in	Jan    	=$    23.00	millions 
Total Sales for	iPad                in	FEB    	=$    27.00	millions 
Total Sales for	MacBookPro          in	Jan    	=$    17.00	millions 
Total Sales for	MacBookPro          in	FEB    	=$    28.10	millions 

===================================================
Total Sales per Location per Period
====================================
Total Sales for	FL                  in	Jan    	=$    57.00	millions 
Total Sales for	FL                  in	FEB    	=$    50.00	millions 
Total Sales for	TX                  in	Jan    	=$   103.00	millions 
Total Sales for	TX                  in	FEB    	=$    85.10	millions 

===================================================
Total Sales per Period per Location
====================================
Total Sales for	Jan                 in	FL     	=$    57.00	millions 
Total Sales for	Jan                 in	TX     	=$   103.00	millions 
Total Sales for	FEB                 in	FL     	=$    50.00	millions 
Total Sales for	FEB                 in	TX     	=$    85.10	millions 

===================================================

Programming Homework Help

York University Self Evaluation Question

 

Make the ppt accroding to the steps(4 slides with speech notes), and finish Part A and B self assessmentMake the ppt accroding to the steps(4 slides with speech notes), and finish Part A and B self assessmentMake the ppt accroding to the steps(4 slides with speech notes), and finish Part A and B self assessment

Programming Homework Help

CMSC 335 UMUC Object Oriented & Concurrent Programming Java Swing GUI Project

 

Instructions

See attached project.

As for project 1, object orientation is one of the main learning objective. Use polymorphism appropriately, do not use instanceof. As always, keep variable scopes as local as possible, do not duplicate code, use methods to factor commonalities, and respect applying good naming conventions. Make sure that your comments are needed, and add useful information.

Here is a simple UI that I wrote satisfying the requirements. You will notice that the 2D shapes are scaled according to dimensions, but not the 3D shapes. You will also notice that the area or volume of the shape is displayed on the left side. You do not have to follow this layout, but this is to give you an idea about what can be done.

Programming Homework Help

The Fuzzy Predictor Performance In 5G Mobile Network Using MATLAB

 

I’m working on a matlab project and need an explanation to help me study.

hello guys.. i complted my final project dessertstion.. when i submitted to my professor i got feedback like this

There seems to be no MATLAB code and table 3 should be text or an Excel object. Figures 8, 9, 10,11, 12,13, 14 and 15 seem to include legends as pictures, they should be MATLAB fig files or Excel graphics objects and/or the corresponding .fig files should also be submitted. The raw data for the graphs should be included in an appendix. The full code listing should be in an appendix as text (not screenshot(s)). Detail all citations referred to in preparing the code.

so i need help in doing Matlab code.. i am attaching the files for which i need matlab code

thanks

Programming Homework Help

University of Phoenix Programming Concepts and Techniques Presentation

 

Complete the following in your own words

Resources: 

  • Baltzan, P. (2016). Business-driven information systems. New York, NY: McGraw Hill Education(online)Analyze IT strategic planning techniques in a presentation with a minimum of 15- to 20- slides that includes: 
    • A summary of strategic planning techniques
    • A description of the role of IT strategy in acquiring business driven information systems
    • A synopsis of common systems acquisition methods (SDLC, RAD, Spiral, outsourcing, etc.)
    • An overview of who participates in the systems acquisition process
    • An overview of common IT governance frameworks
    • A summary of how IT governance fits into an IT strategic plan
    • A discussion of ethical considerations in the strategic planning process

Programming Homework Help

University of The Cumberlands Data Visualization and Data Scientists Discussion

 

What is data visualization?

What is the purpose of visualizing data?

What is the difference between data and information, in terms of analyzing and visualizing data?

  • What process is necessary to analyze or visualize data?
  • What techniques do you hope to learn from this course?
  • General forum requirements:
  • Three posts are required: the initial post and two peer responses.

RESPONSE 1: 

What is data visualization?

Data visualization, in simple terms, means to analyze data visually in a graphical or pictorial format. Data visualization helps decision-makers make decisions much more efficiently and effectively by making it easier to look at such massive data visually.

– What is the purpose of visualizing data?

The primary purpose of data visualization is to make it easier for decision-makers to interpret and analyze big complex data by just looking at graphs or pictures.

– What is the difference between data and information in terms of analyzing and visualizing data?

Data is a very unorganized and raw form of facts and figures or information. Data contains vast information; however, when the data is structured, interpreted, analyzed, and visualized, then it becomes information that is required.

In short, the conclusion made after analyzing and visualizing data is information.

– What process is necessary to analyze or visualize data?

The process necessary to analyze or visualize data is to first create the question and be clear on it, create or gather data, clean up the data by removing redundancies, errors, missing data, etc., selecting the graph type or pictorial best for representing the data, selecting a tool to create the pictorial format, manage the data in the tool, create a visualization.

– What techniques do you hope to learn from this course?

I really hope to learn new tools that can be used for data visualization. I also want to learn the efficient and effective ways to manage the data in raw form. I also want to be able to clean up data.

RESPONSE 2:
Peer Post 2

Data visualization is basically translating complex information into visual form so that it could be easily understood. The visual form can be in different types like maps, flowcharts, bar graphs, Pie charts, etc. Data visualizations help us to understand large data sets easily and they help us in identifying their pattern or occurrences.

The main purpose of data visualization is to collect the large/complicated data sets and compile that data into visual forms so that it becomes easy to understand and would become easy for decision making. With the help of data visualization even complex data can be understood easily and even by the person who’s not familiar with data.

Data is described as raw unstructured, unorganized facts whereas the information is basically organized and structured data that is shown or depicted in the visual form. Data is not dependent on information, but information depends on Data. Data is analyzed and transformed into a visual context which makes it as a piece of information that let us make decisions and understand the data better.

Ans:4 Design process is basically necessary for visualizing data. The design process is divided into 4 stages namely briefing the data which is usually to see that what is wrong or what we want to visualize from this data. The second part is the main in which we collect and clean the data. In the third stage, we will finalize the visualization technique to be used considering on factors like what data to display, data types, the Understanding ability of the audience. Forth and the last stage is creating the data into a visualization story so that it is easy to understand and fulfills its motive.

From this course, I hope to learn data visualization techniques with which I would be able to analyze and visualize my data easily and it would be greatly helpful in my career growth too.

Programming Homework Help

Harvard University Machine Learning Algorithms in Rstudio Coding

 

I’m working on a programming project and need support to help me study.

I am working on a project in R on the babynames dataset.

I have this snippet of code analysis that works but I need to incorporate two machine learning algorithms in this project and I am not sure what to choose and how to implement.

Here is the code:

#install gender and genderdata packages and all applicable libraries

#The gender package in cran contains only demonstration data.

#For full data analysis, I had to download the genderdata package.

install.packages(“genderdata”, type = “source”,

repos = “http://packages.ropensci.org”)

install.packages(c(“gender”, “genderdata”),

repos = “http://packages.ropensci.org”,

type = “source”)

library(gender)

library(genderdata)

library(tibble)

library(dplyr)

#I used (method = “ssa”): United States from 1930 to 2012.

#Drawn from Social Security Administration data.

#I took a sample of random names from websites that identify gender neutral names

#the prospective parents could visit using a Google search and graphed them earlier.

#From the earlier analysis on each name, I chose 7 names that seemed the most neutral based on

#male and female trendlines in the charts.

ssa_names <- c(“Charlie”, “Royal”, “Morgan”, “Skyler”,

“Frankie”, “Oakley”, “Justice”)

ssa_years <- c(rep(c(2009, 2012), 3), 2012)

ssa_df <- tibble(first_names = ssa_names,

last_names = LETTERS[1:7],

years = ssa_years,

min_years = ssa_years – 3,

max_years = ssa_years + 3)

ssa_df

#This dataset connects first names to years but there are columns

#for minimum and maximum years for possible age range since birth dates are not always exact.

#We pass this to gender_df() function, which assigns the method that we wish to use and the names of the columns that contain the names and the birth years. The result is a tibble of predictions.

results <- gender_df(ssa_df, name_col = “first_names”, year_col = “years”,

method = “ssa”)

results

#gender_df() function calculates genders only for unique

#combinations of first names and years

ssa_df %>%

left_join(results, by = c(“first_names” = “name”, “years” = “year_min”))

gender_df(ssa_df, name_col = “first_names”,

year_col = c(“min_years”, “max_years”), method = “ssa”)

#Now, we use gender_df() to predict gender by passing it the columns

#minimum and maximum years to be used for each name

ssa_df %>%

left_join(results, by = c(“first_names” = “name”, “years” = “year_min”))

gender_df(ssa_df, name_col = “first_names”,

year_col = c(“min_years”, “max_years”), method = “ssa”)

ssa_df %>%

distinct(first_names, years) %>%

rowwise() %>%

do(results = gender(.$first_names, years = .$years, method = “ssa”)) %>%

do(bind_rows(.$results))

ssa_df %>%

distinct(first_names, years) %>%

group_by(years) %>%

do(results = gender(.$first_names, years = .$years[1], method = “ssa”)) %>%

do(bind_rows(.$results))

What I really want to do is to use two different algorithms to get to the best method to do that following.

1. Analyze the dataset for the names that are the closet to being equally assigned to either a male or female. The last chart shows the proportions but I want to find an algorithm that would come up with the top 10 names that are the most gender neutral.

Programming Homework Help

Trident University International Create a Java Code Computer Programming Task

 

Pseudocode is very important for programmers. It helps to sort out your thoughts before coding and is for humans (programmers), not machines. Eventually, the pseudocode will need to be converted into an actual program for the machine to read.

Write detailed pseudocode for a program that is designed to organize a family’s property tax payments for the past 20 years. The program should accomplish the following tasks:

1.Prompt the user for the property tax amount and also the year.

2.Use appropriate data structure to store the property tax amount and the year.

3.Use a linear search algorithm to determine which year the family paid the highest property tax, and display the result.

4.Calculate the average amount of property tax paid over the years, and display the result.

The program should:

Allow user input

Select appropriate data structure

Apply linear search algorithm

Please note that this is not an actual program but a program in pseudocode which can be converted into a working program.