Questions
Using Clion (an app that could use C++) to do this question: Create a new project...

Using Clion (an app that could use C++) to do this question:
Create a new project called Lab05b. Keep the main file named main.
• Write a function readAndPrint, and power with parameters noted below in the Functions.h file.
//Your Last Name
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
/*reads from a file
and prints every item to the screen*/
// file contains sets of
//int
//string
//Don't forget to use infile.ignore() between << and getline
//ifstream must be passed by reference
void readAndPrint(ifstream &infile);
//uses a for loop to return the base to the exponent
//e.g. 2^4 = 16
// this fuction should read data.txt file
long power(long base, long exponent);
#endif
• You should place the function prototypes in a file called Functions.h The function prototype has a semi-colon at the end.
• Then you should implement in a file called Functions.cpp
• Finally, declare the infile, and call the readAndPrint function. Then look at the power of 2^3 and 10 ^ 4
• Create a file named data.txt that has the following information.
1
Alpha
2
Beta
3
Gamma
• Your functions.cpp AND your lastnamefirstLab05b.cpp should #include “Functions.h”.
• Remember that you should not #include.cpp files!
• Implementation detail 4: compile and run with:
Run your code
Please take screenshots of Lab05b.cpp, Functions.h, and Functions.cpp.
Thanks for your help!

In: Computer Science

Respond to the following in a minimum of 175 words: Discuss the wireless spectrum and how...

Respond to the following in a minimum of 175 words:


Discuss the wireless spectrum and how it relates to a wireless network. What frequency ranges, or bands, are associated with wi-fi use? How does wi-fi transmission differ from data transmission over a physical network? How might that difference affect data security over a wi-fi network?


In: Computer Science

Two Systems 80 Km apart are communicating through a direct Metallic cable (note: signal speed is...

Two Systems 80 Km apart are communicating through a direct Metallic cable (note: signal speed is 2 x 10^8 m/s). The data is in the form of 60 KB packets with transmission rate 1M bps. Calculate the following:

  1. Data transmission time per packet.
  2. Propagation delay.
  3. bit duration.
  4. Bit length.
  5. Number of bits in the cable between the sender and receive

In: Computer Science

In this example you are allowed to use from the C standard library only functions for...

In this example you are allowed to use from the C standard library only functions for input and output (e.g. printf(), scanf())

Complete the following functions using C programming language:

  • intQ1_for()
  • intQ1_while()
  • intQ1_do()

To compute the sum of all numbers that are multiples of 4, between 30 and 1000, in three different ways: with a for loop, a while loop and a do-while loop, accordingly. After each loop print the value on the screen. Return the total sum at the end of each function

In: Computer Science

Task 1: HTML and CSS Create a website using HTML5 and CSS3 only. Website theme can...

Task 1: HTML and CSS

Create a website using HTML5 and CSS3 only. Website theme can be anything you want: a country, a town, a place, a hobby, people (yourself, your family...), pets, flowers, food, or anything that you find interesting or useful. It may be about real people/places/things or fictitious.

Part 1: Content (HTML)

After you decide the theme of your website, create HTML pages with the content you want to present. Remember to separate content from presentation. The content is placed in the HTML files, and the layout and style will be defined using CSS (see part 2). Your website must include (at least):

  • 3 html pages:
    • index.html: this is the landing page (must be named index.html). The landing page is the first page a visitor will see when visiting your website.
    • another html page (any name)
    • yet another html page (any name)
  • a typical layout using semantic tags (header, nav, footer, article...)
  • page titles for each html page (titles show on the title bar/tabs)
  • different size headings
  • images:
    • at least 5 images in one html page,
    • the other pages may have any number of images (or none).
    • make sure all image paths are relative (not absolute)
  • internal links:
    • links from index.html to the other html pages you created
    • links from all the other pages back to index.html
    • make sure all internal links are relative links (not absolute)
  • external links:
    • at least two links to external websites (pages that you did not create).
    • external links should open in a new tab/window.
  • a list (ordered or unordered)
  • a table (with some relevant data)
  • your copyright info at the footer (with the © symbol).
  • classes and id's as needed (for styling with css)

Do not forget to make your pages accessible. You should double-check your code to make sure you are not missing closing tags, etc. and test it using different browsers. Focus on making your pages syntactically and semantically correct.

Part 2: Style (CSS)

You'll create an external stylesheet (css) to style the html pages you created in part 1. Name this file main.css.

All html pages should link to the same main.css file. You must use a variety of selectors and properties presented in chapters 4 and 5, including:

  • font family, size, color, background color of text and headings, font color for links (make sure visited and unvisited links are displayed in different colors)
  • positioning elements
  • special effects or animations
  • a navigation menu

Part 3: An alternate style (CSS)

You'll create a different CSS file, with different style and layout rules, to make your HTML pages look completely different (without making any changes to the HTML files).

  • Name this css file alternate.css.
  • Do not create new html files. You may change the name of the css linked in the html <head> section back and forth (while testing).
  • Before submitting, make sure all html files link to main.css (we'll change it when testing).

In: Computer Science

Define a problem utilizing Stacks. Write the design, code and display output. please in c++ oop?

Define a problem utilizing Stacks. Write the design, code and display output. please in c++ oop?

In: Computer Science

Write the following program in Java. Ask the user to enter the number of rows and...

Write the following program in Java.

Ask the user to enter the number of rows and columns for a 2-D array. Create the
array and fill it with random integers using (int)(Math.random() * 20) (or whatever
number you choose). Then, provide the user with several menu choices.
1. See the entire array.
2. See a specific row.
3. See a specific column.
4. See a specific value.
5. Calculate the average of each row.
6. Calculate the total of each column.
7. Exit
If the user chooses option:
1 - output the entire array in chart format.
2 - ask the user for the specific row number and output the values from that row,
all columns, going across the screen.
3 - ask the user for the specific column number and output the values from that
column, all rows, going down the screen.
4 - ask the user for the specific row and column number and output the value at
that position (1 value only).
5 - output the information in chart format, including placing the average at the
end of each row.
6 - output the information in chart format, including placing the total below each
column.
7 - thank the user and exit the program
Any other option should produce an error message.
The program should continue until the user chooses option 7.

Please try to use basic coding(nothing too complicated so I can understand)

In: Computer Science

Unlike other engineering approaches software engineering process is NOT rigid. Justify why?

Unlike other engineering approaches software engineering process is NOT rigid. Justify why?

In: Computer Science

Write a Java program for a car dealership. The dealer has 10 cars in the showroom...

Write a Java program for a car dealership. The dealer has 10 cars in the showroom and space for 50 cars. Each car has a unique plate number, model, color, company, and a year of manufacture. Your program should have two classes: the "Car" class has the car information and the "info" method that displays the car information. The other class is an array class "CarArray" that has four methods:" display", "insert", "find", and the "delete" method. When the program is executed, the following menu should appear. The insert, search, and delete should ask the user to enter the plate number of the car. If there is more than one car of the same plate number, all of them should be deleted.

1- Diplay

2- Insert

3- Search

4- Delete

Enter your choice:

Enter the plate #:

Extra Points (10 points): Add "findByColor" and "findByModel" methods that should return an array of car with all the information.

In: Computer Science

To the TwoDArray class, add a method called transpose() that generates the transpose of a 2D...

To the TwoDArray class, add a method called transpose() that generates the transpose of a 2D array with the same number of rows and columns (i.e., a square matrix). Add appropriate code in main() of the TwoDArrayApp class to execute the transpose() method and use the display() method to print the transposed matrix.

/**
* TwoDArray.java
*/

public class TwoDArray
{
   private int a[][];
   private int nRows;

public TwoDArray(int maxRows, int maxCols)        //constructor
{
   a = new int[maxRows][maxCols];
   nRows = 0;
}
//******************************************************************
   public void insert (int[] row)
   {
       a[nRows] = row;
       nRows++;
   }
//******************************************************************
   public void display()
   {
       for (int i = 0; i < nRows; i++)
       {
           for (int j = 0; j < a[0].length; j++)
               System.out.format("%5d", a[i][j]);
           System.out.println(" ");
       }
   }
}

public class TwoDArrayApp{
  
public static void main(String[] args )
{
   int maxRows = 20;
   int maxCols = 20;
  
   TwoDArray arr = new TwoDArray(maxRows, maxCols);    
   int b[][] = {{1, 2, 3, 4}, {11, 22, 33, 44}, {2, 4, 6, 8},{100, 200, 300, 400}};
  
  
   arr.insert(b[0]); arr.insert(b[1]); arr.insert(b[2]); arr.insert(b[3]);
  

  
   System.out.println("The original matrix: ");
   arr.display();
  
   System.out.println("Column sum: ");
   arr.sumCols();  
  
   System.out.println(" ");
   System.out.println("\nThe matrix after being transposed: ");
   arr.transpose();
  
  
  

  
}
}

In: Computer Science

Write a Python program that computes the income tax for an individual. The program should ask...

Write a Python program that computes the income tax for an individual. The program should ask the user to enter the total taxable income for the year. The program then uses the tax bracket (as shown below) to calculate the tax amount. This is based on a progressive income tax system which is how income tax is calculated in the U.S. As a result, this for example means that only income above $500,001 is taxed at 37%. Income of lower levels are taxed at their given marginal rate. 10% on taxable income from $0 to $9,525, plus 12% on taxable income over $9,526 to $38,700, plus 22% on taxable income over $38,701 to $82,500, plus 24% on taxable income over $82,501 to $157,500, plus 32% on taxable income over $157,501 to $200,000, plus 35% on taxable income over $200,001 to $500,000, plus 37% on taxable income over $500,001 or more.

In: Computer Science

Write a Python program that computes the income tax for an individual. The program should ask...

Write a Python program that computes the income tax for an individual. The program should ask the user to enter the total taxable income for the year. The program then uses the tax bracket (as shown below) to calculate the tax amount. This is based on a progressive income tax system which is how income tax is calculated in the U.S. As a result, this for example means that only income above $500,001 is taxed at 37%. Income of lower levels are taxed at their given marginal rate.

10% on taxable income from $0 to $9,525,

plus 12% on taxable income over $9,526 to $38,700,

plus 22% on taxable income over $38,701 to $82,500,

plus 24% on taxable income over $82,501 to $157,500,

plus 32% on taxable income over $157,501 to $200,000,

plus 35% on taxable income over $200,001 to $500,000,

plus 37% on taxable income over $500,001 or more

In: Computer Science

Take a critical look at three GUI applications you have used—for example, a spreadsheet, a word-processing...

Take a critical look at three GUI applications you have used—for example, a spreadsheet, a word-processing program, and a game. Describe how well each conforms to the GUI design guidelines listed in this chapter.

In: Computer Science

Prove that P1, P2 ⊢ C P1: (∀x)(∃y)(P(x) ⇒ (Q(y) ∧ T(x, y)∧ ∼ S(x, y)))...

Prove that P1, P2 ⊢ C
P1: (∀x)(∃y)(P(x) ⇒ (Q(y) ∧ T(x, y)∧ ∼ S(x, y)))
P2: (∃x)(∀y)(P(x) ∧ ((Q(y) ∧ R(x, y)) ⇒ S(x, y)))
C: ∼ (∀x)(∀y)((P(x) ⇒∼ T(x, y)) ∨ (Q(y) ⇒ R(x, y)))

In: Computer Science

For this exercise you will use the Order Entry (oe) schema that is one of the...

For this exercise you will use the Order Entry (oe) schema that is one of the sample schemas in Oracle.

Table 4-2 Order Entry (OE) Schema Scripts

Script Name Description
oc_comnt.sql Adds comments to the online catalog (OC) subschema wherever possible.
oc_cre.sql Creates the OC subschema.
oc_drop.sql Drops the OC subschema.
oc_main.sql Main script for the OC subschema.
oc_popul.sql a Populates the object tables.
oe_analz.sql Gathers statistics on the OE objects.
oe_comnt.sql Creates comments for the objects in the schema.
oe_cre.sql Creates the OE objects.
oe_drop.sql Drops the OE schema and all its objects.
oe_idx.sql Creates indexes on the OE tables.
oe_main.sql Main script for the OE schema; calls other scripts.
oe_views.sql Creates the OE schema views.

List of OE Objects

FUNCTION 
 GET_PHONE_NUMBER_F

INDEX 
 CUSTOMERS_PK
 CUST_ACCOUNT_MANAGER_IX
 CUST_EMAIL_IX
 CUST_LNAME_IX
 CUST_UPPER_NAME_IX
 INVENTORY_IX
 INV_PRODUCT_IX
 ITEM_ORDER_IX
 ITEM_PRODUCT_IX
 ORDER_ITEMS_PK
 ORDER_ITEMS_UK
 ORDER_PK
 ORD_CUSTOMER_IX
 ORD_ORDER_DATE_IX
 ORD_SALES_REP_IX
 PRD_DESC_PK 
 PRODUCT_INFORMATION_PK
 PROD_NAME_IX
 PROD_SUPPLIER_IX
 PROMO_ID_PK
 REFERENCE_IS_UNIQUE
 SYS_C003584
 SYS_C003587
 SYS_C003588
 SYS_C003589
 SYS_C003590
 WAREHOUSES_PK
 WHS_LOCATION_IX
 
LOB 
 SYS_LOB0000045843C00022$$
 SYS_LOB0000045843C00023$$
 SYS_LOB0000045852C00003$$
 SYS_LOB0000045852C00012$$
 SYS_LOB0000045852C00013$$ 
 SYS_LOB0000046019C00004$$ 
 SYS_LOB0000046019C00005$$ 
 SYS_LOB0000046019C00007$$ 
 SYS_LOB0000046019C00011$$ 
 SYS_LOB0000046019C00012$$ 
 SYS_LOB0000046019C00015$$ 
 SYS_LOB0000046019C00024$$ 
 SYS_LOB0000046019C00031$$ 
 SYS_LOB0000046019C00032$$ 
 SYS_LOB0000046044C00003$$ 
 
SEQUENCE 
 ORDERS_SEQ 
 
SYNONYM 
 COUNTRIES 
 DEPARTMENTS 
 EMPLOYEES 
 JOBS 
 JOB_HISTORY 
 LOCATIONS 
 
TABLE 
 CATEGORIES_TAB 
 CUSTOMERS 
 INVENTORIES 
 ORDERS 
 ORDER_ITEMS 
 PRODUCT_DESCRIPTIONS 
 PRODUCT_INFORMATION 
 PRODUCT_REF_LIST_NESTEDTAB 
 PROMOTIONS 
 PURCHASEORDERS 
 STYLESHEET_TAB 
 SUBCATEGORY_REF_LIST_NESTEDTAB 
 WAREHOUSES 
 
TRIGGER 
 INSERT_ORD_LINE 
 ORDERS_ITEMS_TRG 
 ORDERS_TRG 
 PURCHASEORDERS$xd 
 
TYPE 
 CATALOG_TYP 
 CATALOG_TYP 
 CATEGORY_TYP 
 CATEGORY_TYP 
 COMPOSITE_CATEGORY_TYP 
 COMPOSITE_CATEGORY_TYP 
 CORPORATE_CUSTOMER_TYP 
 CUSTOMER_TYP 
 CUST_ADDRESS_TYP 
 INVENTORY_LIST_TYP 
 INVENTORY_TYP 
 LEAF_CATEGORY_TYP 
 LEAF_CATEGORY_TYP 
 ORDER_ITEM_LIST_TYP 
 ORDER_ITEM_TYP 
 ORDER_LIST_TYP 
 ORDER_TYP 
 PHONE_LIST_TYP 
 PRODUCT_INFORMATION_TYP 
 PRODUCT_REF_LIST_TYP 
 SUBCATEGORY_REF_LIST_TYP 
 SYS_YOID0000046073$ 
 SYS_YOID0000046075$ 
 SYS_YOID0000046077$ 
 SYS_YOID0000046079$ 
 SYS_YOID0000046081$ 
 WAREHOUSE_TYP 
 XDBPO_ACTIONS_TYPE 
 XDBPO_ACTION_COLLECTION 
 XDBPO_ACTION_TYPE 
 XDBPO_LINEITEMS_TYPE 
 XDBPO_LINEITEM_COLLECTION 
 XDBPO_LINEITEM_TYPE 
 XDBPO_PART_TYPE 
 XDBPO_REJECTION_TYPE 
 XDBPO_SHIPINSTRUCTIONS_TYPE 
 XDBPO_TYPE 
 
TYPE BODY 
 CATALOG_TYP 
 COMPOSITE_CATEGORY_TYP 
 LEAF_CATEGORY_TYP 
 
VIEW 
 ACCOUNT_MANAGERS 
 BOMBAY_INVENTORY 
 CUSTOMERS_VIEW 
 DEPTVIEW 
 OC_CORPORATE_CUSTOMERS 
 OC_CUSTOMERS 
 OC_INVENTORIES 
 OC_ORDERS 
 OC_PRODUCT_INFORMATION 
 ORDERS_VIEW 
 PRODUCTS 
 PRODUCT_PRICES 
 SYDNEY_INVENTORY 
 TORONTO_INVENTORY 
 


OE Table Descriptions

Table CATEGORIES_TAB 
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 CATEGORY_NAME                                      VARCHAR2(50)
 CATEGORY_DESCRIPTION                               VARCHAR2(1000)
 CATEGORY_ID                               NOT NULL NUMBER(2)
 PARENT_CATEGORY_ID                                 NUMBER(2)
 
Table CUSTOMERS
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 CUSTOMER_ID                               NOT NULL NUMBER(6)
 CUST_FIRST_NAME                           NOT NULL VARCHAR2(20)
 CUST_LAST_NAME                            NOT NULL VARCHAR2(20)
 CUST_ADDRESS                                       CUST_ADDRESS_TYP
 PHONE_NUMBERS                                      PHONE_LIST_TYP
 NLS_LANGUAGE                                       VARCHAR2(3)
 NLS_TERRITORY                                      VARCHAR2(30)
 CREDIT_LIMIT                                       NUMBER(9,2)
 CUST_EMAIL                                         VARCHAR2(30)
 ACCOUNT_MGR_ID                                     NUMBER(6)
 CUST_GEO_LOCATION                                  MDSYS.SDO_GEOMETRY
 DATE_OF_BIRTH                                      DATE
 MARITAL_STATUS                                     VARCHAR2(20)
 GENDER                                             VARCHAR2(1)
 INCOME_LEVEL                                       VARCHAR2(20)
 
Table INVENTORIES
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PRODUCT_ID                                NOT NULL NUMBER(6)
 WAREHOUSE_ID                              NOT NULL NUMBER(3)
 QUANTITY_ON_HAND                          NOT NULL NUMBER(8)
 
Table ORDERS
 Name                                 Null?    Type
 ------------------------------------ -------- ----------------------------
 ORDER_ID                             NOT NULL NUMBER(12)
 ORDER_DATE                           NOT NULL TIMESTAMP(6) WITH LOCAL TIME ZONE
 ORDER_MODE                                    VARCHAR2(8)
 CUSTOMER_ID                          NOT NULL NUMBER(6)
 ORDER_STATUS                                  NUMBER(2)
 ORDER_TOTAL                                   NUMBER(8,2)
 SALES_REP_ID                                  NUMBER(6)
 PROMOTION_ID                                  NUMBER(6)
 
Table ORDER_ITEMS
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ORDER_ID                                  NOT NULL NUMBER(12)
 LINE_ITEM_ID                              NOT NULL NUMBER(3)
 PRODUCT_ID                                NOT NULL NUMBER(6)
 UNIT_PRICE                                         NUMBER(8,2)
 QUANTITY                                           NUMBER(8)
 
Table PRODUCT_DESCRIPTIONS 
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PRODUCT_ID                                NOT NULL NUMBER(6)
 LANGUAGE_ID                               NOT NULL VARCHAR2(3)
 TRANSLATED_NAME                           NOT NULL NVARCHAR2(50)
 TRANSLATED_DESCRIPTION                    NOT NULL NVARCHAR2(2000)
 
Table PRODUCT_INFORMATION
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PRODUCT_ID                                NOT NULL NUMBER(6)
 PRODUCT_NAME                                       VARCHAR2(50)
 PRODUCT_DESCRIPTION                                VARCHAR2(2000)
 CATEGORY_ID                                        NUMBER(2)
 WEIGHT_CLASS                                       NUMBER(1)
 WARRANTY_PERIOD                                    INTERVAL YEAR(2) TO MONTH
 SUPPLIER_ID                                        NUMBER(6)
 PRODUCT_STATUS                                     VARCHAR2(20)
 LIST_PRICE                                         NUMBER(8,2)
 MIN_PRICE                                          NUMBER(8,2)
 CATALOG_URL                                        VARCHAR2(50)
 
PRODUCT_REF_LIST_NESTEDTAB 
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 COLUMN_VALUE                                       NUMBER(6)
 
Table PROMOTIONS
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PROMO_ID                                  NOT NULL NUMBER(6)
 PROMO_NAME                                         VARCHAR2(20)
 
Table PURCHASEORDERS
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
TABLE of SYS.XMLTYPE(XMLSchema 
"http://www.oracle.com/xdb/ord.xsd" 
Element "PurchaseOrder") 
STORAGE Object-relational
TYPE "XDBPO_TYPE" 
 
Table STYLESHEET_TAB
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 NUMBER
 STYLESHEET                                         XMLTYPE
 
Table SUBCATEGORY_REF_LIST_NESTEDTAB
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 COLUMN_VALUE                                       REF OF CATEGORY_TYP
 
Table WAREHOUSES
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 WAREHOUSE_ID                              NOT NULL NUMBER(3)
 WAREHOUSE_SPEC                                     SYS.XMLTYPE
 WAREHOUSE_NAME                                     VARCHAR2(35)
 LOCATION_ID                                        NUMBER(4)
 WH_GEO_LOCATION                                    MDSYS.SDO_GEOMETRY
  1. Write a SQL statement to show all non-married customers’ full name, gender, income_level and total amount spent on the product ‘Video Card /32’ AND whose credit limit is less than 700.

  2. Write a SQL statement to show the total amount spent on products summarized by Category and each month of each year (YYYY-MM); Order the results in descending order of YYYY-MM

  3. Write a SQL statement to show the total amount spent on products summarized by product category and Year, along with RANK within each year (order by increasing RANK of amount spent)

  4. Write a SQL statement to show the product category names of the products that have the smallest percentage discount (that is non-zero) off of the Product_information.list_price. (Display the top 10).

  5. Who is the “best” customer? Justify your rationale and back it up with a query showing the data. You may also wish to graph your data to support your justification.

  6. Write a query that shows each month/year total sales by state along with a column that shows the difference from the prior month/year sales. (Hint: Look at the LAG function)

  7. Create a VIEW in your own schema that joins together all of the columns in the Customers, Orders, Order_items, Product_information and categories_tab. Be sure to “flatten” the CUST_ADDRESS, phone numbers and CUST_GEO_LOCATION. (See below Note on ‘flattening’)

  8. Import all of the data from your VIEW into Microsoft Excel. Create a pivot table from the resulting data set and then summarize the data according to total sales by category_name and customer credit limit.

  9. Import all of the data from your view into Tableau. Create an appropriate visualization from the resulting data set that summarizes the data according to total sales by category_name and customer income level over time.

In: Computer Science