discussion database concept and programming

 Compare and contrast the problems associated with file systems with the disadvantages of database systems. 

Textbook Material:

 Printed Textbook: Database Systems: Design, Implementation, and Management, 13th
edition, Coronel and Morris.  

 Chapter 1 – Database Systems
Identify some of the pitfalls of file-based storage and introduce some of the advantages gained when using a database.

Chapter 2 – Data Models
An overview of the data models and discussion of the terminology and basic structural concepts. 

Design and code a class

  

Problem

Design and code a class that will be used to encapsulate a collection of “segment” objects.

Write the code for a class called a “disk” which may contain any number of segment objects, and a string (maximum of 2 characters) indicating the mode (i.e. “w” (write), or “a” (append)) that this disk may be accessed with.

You must modify the attached “segment” class to include the following constructors, each calling their appropriate initialize( ) function(from the attached segment files):

segment( )

segment(const char [ ][2000], int)

As well, you must change the following functions:

int match(const char [ ]);

voidget_word(char [ ], int);

charget_char(int, int);

which were not declared as const functions previously, into constant member functions, by adding the keyword const after their declaration in both the “segment.h” and “segment.cpp” source files.

A “disk” has the following publicly accessible MEMBER functions:

disk(intnum_of_segments, const char *mode)

This constructor allocates enough memory for the disk to storea series of up to “num_of_segments” segments, and sets thedisk’s access mode to the constant string stored in “mode”.

If the string in “mode” is anything other than “w”, or “a”,the disk’s mode must be set to “w” (write).

disk( )

This constructor allocates enough memory for the disk to store

up to twenty (20) segments, and initializes the disk’s access

mode to “w” (write).

const char* get_mode( ) const

This function returns the disk’s access mode as a constant string.

segmentget_segment(intpos) const

This function returns the segment at position “pos”

(where a “pos” value of 0 means the first segment).

The function returns a default segment if “pos” does not reference

one of the disk’s properly initialized segments.

intget_segment_count( ) const

This is used to return an integer value representing the number of

segment objects that have been properly initialized.

const segment* get_all_segments( ) const

This function returns the array containing all of the disk’s

data segments.

int access(const char fname[ ])

This function will either write “w”, or append “a” data

(depending on the access mode) to the file whose name is

stored in “fname”, and return the number of charcters processed

(please see below for details about each access mode).

write:

For this operation, the function must write all of the data in eachof the class’s segments (one segment per line) followed by a newline.

Also, each word in the segment must be separated by a space ‘ ‘ when written to the file spaces and newlines each count as a single (1) character when written).

NOTE: This operation overwrites any data which the file may have

contained.

(see example below).

Assume a “disk” object consists of the following 3 segments:

words: 1 2 3 4 5 6 7 8 9 10

segment1: “”, “” “This”, “is”, “OOP244”, “”, “”, “”, “”, “”

segment2: “Isn’t”, “this”, “”,  “”, “easy?”, “”, “”, “”, “”, “”

segment3: “”, “”, “”, “Yes!”,””, “”, “”, “”, “”, “”

Then the function would write the following to the file:

This is OOP244

Isn’t this easy?

Yes!

and return a value of: 37

15 for (line 1) +

17 for (line 2) +

5 for (line 3)

for a total of 37 charcters written to the file.

BE CAREFUL HERE!

Pay careful attention to the number of spaces and newlines written with respect to each segment!

append:

Exactly the same as “write”, except that data is appended to the end of the file instead of being overwritten.

operator+= 

You must also be able to add segments to a disk by overloading the

+= operator which adds segments (on the right side of the operator)to the disk (on the left side of the operator), unless the disk is already full in which case nothing is done.

NOTE: This operator must return the newly modified “disk” object by value.

NOTE: Because “proper copies” of “disk” objects must be made, it will be necessary for you to include a copy constructor as well an equal operator overload to handle situations when “disk” objects are returned by value or when they are assigned to one another.

You must also code a destructor to remove any memory which may have been dynamically allocated.

A main program (a3main.cpp), which will assume that your “disk” class is declared in a file named “disk.h” and should be compiled and linked with the code for the “disk” (which presumably will be in “disk.cpp”), will test your class to see if it works properly.

Note: The file assign1.c (which searches through the constant null-terminated string “core” looking for the characters ‘1’ and ‘0’ which, when taken 8 at a time and convert to their numeric value in decimal, encode a meaningful ascii character, and inserts that character into the array “data”) attached will need to be executed as part of the solution.

a3main.cpp and assign1.c must not be modified or the solution will be invalidated.

Programming Java

Question 1:

Write a program that asks the user for a positive nonzero integer value. The program should use a loop (while loop) to get the sum of all the integers from 1 up to the number entered. For examples, if the user enters 50, the loop will find the sum of 1,2,3,4,….50.

Hint: You need two while loops here. One to make sure the user enters a positive number (keeps on asking the user for a number till heshe enters a positive nonzero number).  And two to find the sum.

Question 2:

The distance a vehicle travels can be calculated as follows:

                Distance = Speed * Time

For example, if a train travels 40 miles per hour for 3 hours, the distance traveled is 120 miles. Write a program that asks for the speed of a vehicle (in miles per hour) and the number of hours it has traveled. It should use a loop to display the distance a vehicle has traveled for each hour of a time period specified by the user. For example, if a vehicle is traveling at 40 mph for a 3 hour time period, it should display a report similar to the one that follows:

Hours                                    Distance

                1                                              40
                2                                              80
                3                                              120

Input validation: Do not accept a negative number for speed and do not accept any value less than 1 for time traveled (i.e. use a loop to keep on asking the user till heshe gives you an acceptable value for both).

Question 3:

Write a program that will predict the size of a population of organisms. The program should ask for the starting number of organisms, their average daily population increase (as a percentage), and the number of days they will multiply. For example, a population might begin with two organisms, have an average daily increase of 50 percent, and will be allowed to multiply for seven days. The program should use a loop to display the size of the population for each day. So for the previous example, the output should look like:

Day                        Organisms

—————————–

1                              2.0

2                              3.0

3                              4.5

4                              6.75

5                              10.125

6                              15.1875

7                              22.78125

Input validation: Do not accept a number less than 2 for the staring size of the population. Do not accept a negative number for average percent daily population increase. Do not accept a number less than 1 for the number of days they will multiply.

Question 4:

Write a program with a loop that lets the user enter a series of integers. The user should enter -99 to signal the end of the series. After all the numbers have been entered, the program should display the largest and smallest numbers entered.

Question 5:

Write a program that displays a table of centigrade temperatures 0 through 20 and their Fahrenheit equivalents. The formula for converting a temperature from centigrade to Fahrenheit is:

                F =  95 * C + 32

Where F is the Fahrenheit temperature and C is the centigrade temperature. Your program must use a loop to display the table.

Question 6:

Write a multiplication tutor program. Ask user to solve problems with random numbers from 1-20. The program stops after an incorrect answer. The output should look like:

14 * 8 = 112

Correct!

5 * 12 = 60

Correct!

8 * 3 = 24

19 * 14 = 256

Incorrect; the answer was 266

You solved 2 correctly

You are designing a program

You are designing a program to study rainfall over a 3-year period. The program should use a NESTED loop to total the amount of rainfall each year and show the annual rainfall for each of the 3 years in chart format similar to the following chart (example data only). Attached is a file with 3 years (36 months) of monthly rainfall data. You may use this data file or create your own. The program should redirect the input to your data file. You may submit the program in Raptor or use pseudocode (Raptor does not support FOR loops). Hints: You will need an accumulator variable, two counter variables, and an input variable to accept the rainfall amount each month. Be sure to test the program and make adjustments as needed.

Year Total Rainfall (in inches)

————————————————

Year 1 34

Year 2 28

Year 3 36

Performance Benchmarks ( Computer Architecture )

Homework Content

So far, we have been looking at Computer Architecture from a very high level…and hopefully, you are starting to look at your laptops and cell phones in terms that you were not before this class… We also discussed that every computer design is optimized with performance in mind so the question now is…just how good (or bad) is MY laptop compared against some performance benchmarks…

See the website below:
https://www.passmark.com/products/pt.htm

This site has free benchmarking software that you can download and run against your computer…download the software and let it run against your system…run both the Standard AND the Advanced Test…
NOTE: THE ABOVE LINK IS FOR WINDOWS TESTING…PLEASE SEE THE FOLLOWING WEBSITES FOR SOME PERFORMANCE TESTING SOFTWARE FOR THE MAC…IF YOU ARE A MAC USER AND ALREADY HAVE A PERFORMANCE MEASURE SOFTWARE, YOU MAY USE IT…
https://browser.geekbench.com/mac-benchmarks
https://www.macworld.co.uk/how-to/mac/test-mac-speed-3654776/

So how did your system do?…what was your overall score and percentile?…what are the scores telling you?…were you surprised by the results?…do the benchmarks provided sync up with how you feel your system is performing?…provide some screen shots of the results…what takeaways do you have from this test?…any follow-ups?…how can you improve the performance of your laptop?…do you use any other performance testing software?…if so, which ones?…how do the results compare?…provide screen shots of the other performance monitoring software…

Keep your results handy…we will refer to them throughout the semester…

As I mentioned, I am more concerned with QUALITY than I am with QUANTITY…but just as a guideline, you should submit at least ONE FULL PAGES OF WRITTEN CONTENT…meaning that screen shots (and this assignment has many), title page, source listing, etc. do NOT count as part of the one page…

Plagiarism is not allowed and I will give you an automatic zero if I discover that any part of your work was plagiarized either from the internet or another student’s paper.

Please answer the following

 

What is Medicare? Explain the components and financing of each part. What are the problems for Medicare? What are your solutions? 

The  paper should be 3 pages and include the following and must be free of plagiarism 

• Introduce and define the topic (your study group knows nothing about it). 

• Discuss the details of the topic. 

• What are the pros and cons (or support vs opposition)? 

• What is your personal stand on the issue? 

• After reading the briefing paper, a member of your support group should have a general understanding of the issue. 

Declare an array. Gather your first and last name as

  

Declare an array. Gather your first and last name as string input (as all lowercase, with an underscore between first and last name) via scanf and store it in your array. Then, capitalize the first letter of both your first and last name and switch the underscore to a space character. Output the array to the screen before and after the capitalization change.
Use the DEFINE preprocessor directive to represent the size of your name array throughout the program.
Per assignment guidelines, the program should be written to work with any reasonable first name / last name combination.
Example:david_robeson “There is an underscore between the names if you can’t see it.”
David Robeson

Managing Inventory

  

This assignment relates to the following Course Learning Requirements:  

CLR 1: Using accounting software, identify and use the basic features, modules, and aids to produce reliable and accurate financial information.

CLR 2: Using accounting software, create a computerized accounting system for a new company.

CLR 3: Using accounting software, record all transactions in the accounting cycle.

CLR 5: Using accounting software, produce and export management reports and financial statements.

Objective of this Assignment:  

The objective of this assignment is to ensure students understand the step-up of inventory and the products and services.

Assignment Scenario:

Beautiful Blooms Floral Company is a relatively new and growing business that is switching its bookkeeping to QuickBooks Online. As their bookkeeper, in this assignment, you will enter the required start-up information by following the steps in 

· the Chapter 8 Reinforce Your Skills exercises and 

· the Chapter 8 Apply Your Skills exercises.  

Pre-Assignment Instructions:

1. To prepare you for this assignment, please read the content in Chapter 8 and follow the embedded learning activities (the Develop Your Skills exercises).

To follow along with the examples in the text before doing the assignment:

a. Use the QuickBooks Online sample company to follow along with the practice Develop Your Skills exercises in the textbook. See Module 3 for more information about the QuickBooks Online sample company. 

b. Remember that the sample company will refresh after a couple of hours of inactivity, so it is best to complete all the practice exercises in one session. You do not need to submit these practice reports. All exercises using the sample company are ungraded.

Assignment Tasks: 

1. Open the QuickBooks Online application software.

2. Use the chapter steps to complete the Chapter 8 Reinforce and Apply Your Skills exercises. Enter each transaction based on the information provided. 

3. Follow the steps in the Apply Your Skills exercises to export each report to Excel. You will only be submitting reports from the Apply Your Skills exercises. You do NOT need to submit the reports saved from the Reinforce Your Skills exercises. 

4. In order to submit your assignment into one excel workbook, you will need to cut and paste each report into ONE excel workbook.

5. Check to ensure that the asset and expense accounts have the correct debit balances.

6. Check to ensure that revenue and liabilities account have the correct credit balances.

Submissions:

You should be submitting ONE Excel file that contains one worksheet for each of the following reports (from the Apply Your Skills exercises):

1. Products and Service List

2. Inventory Valuation Detail

3. Sales by Product and Service Summary

Do NOT submit the reports from the Reinforce Your Skills exercises.

Save file as:

D8 Beautiful Blooms Floral Co Report Name – Student Name

Scoring Rubric – Assignment #6 [5%]

  

ITEM

REQUIREMENTS

MARK

 

Products and Service List

– Heading is complete   with Company Name, Name of report and date centered at the top three lines

– Correct number of items   are included with the correct values 

– Report is detail

– Report dated correctly

/20

 

Inventory Valuation Detail

– Heading is complete   with Company Name, Name of report and date centered at the top three lines

– Correct number of items   are included with the correct quantity

– Correct number of items   available included

– Report dated correctly

– Report is detail

/20

 

Sales by Product and Service Summary

– Heading is complete   with Company Name, Name of report and date centered at the top three lines

– Correct number of items   are included with the correct values 

– Report is detail

– Report dated correctly

/15

 

Format

– Assignment submitted in   Excel Format

– All reports included in   ONE workbook

– All required reports   included

– All reports are correct

– Consistent format   through workbook

/5

 

TOTAL

/60