I am having trouble writing the individual files for part 1, which is as follows:
part 1
Purpose
This assignment reviews object-oriented programming concepts such as classes, methods,
constructors, accessor methods, and access modifiers. It makes use of an array of objects as a
class data member, and introduces the concept of object serialization or \"binary I/O\".
Set Up
(Yes, these commands are rather tedious to type repeatedly. Part 2 of this assignment introduces
a new technique for compiling and linking your program files called a makefile. Makefiles
require a bit more work up front, but save a lot of typing at the command line once the makefile
has been created.)
As in Assignment 1, you should create a subdirectory to hold your files for Assignment 2.
In that directory, make a symbolic link to the data file for this part of the assignment:
In this assignment, you will be creating several source code and header files, as described below.
You can create each of these files separately using the nano editor, just as you did on Assignment
1.
To compile and link the program you\'ve created, type:
Once you\'ve added the AccountDB class, you should type:
To run the executable file created by the previous command, type:
Program
For this assignment, you will need to write three source code files as well as two header files.
Each of these files is relatively short, but many inexperienced programmers are overwhelmed by
the idea of writing a program as multiple files. \"Where do I start?!!\" is a common refrain. This
assignment sheet attempts to walk you through the steps of writing a multi-file program.
The steps outlined below should not be thought of as a purely linear process, but rather an
iterative one - For example, work a little on Step 1, then a little on Step 2, then test what you\'ve
written (Step 3).
Step 1: Write the CreditAccount class declaration
The CreditAccount class represents information about a credit card account. The code for the
CreditAccount class will be placed in two separate files, which is the norm for non-template C++
classes.
The header file for a class contains the class declaration, including declarations of any data
members and prototypes for the methods of the class. The name of the header file should be of
the form ClassName.h (for example, CreditAccount.h for the header file of theCreditAccount
class).
A skeleton for the CreditAccount.h file is given below. As shown, a header file should begin and
end with header guards to prevent it from accidentally being #included more than once in the
same source code file (which would produce duplicate symbol definition errors). The symbol
name used in the header guards can be any valid C++ name that is not already in use in your
program or the C/C++ libraries. Using a name of the format CLASSNAME_H (like
CREDIT_ACCOUNT_H in the code below) is recommended to avoid naming conflicts.
Data Members
The CreditAccount class should have the following private data members:
an accoun.
C++ Programming Class Creation Program Assignment InstructionsTawnaDelatorrejs
C++ Programming: Class Creation Program Assignment Instructions
Overview
The purpose of this assignment is to give you some practice with creating your own classes. This program serves as the basis for all of the other programming assignments in this class and your future Computer Science classes.
Instructions
Construct a class named Square that has a floating-point data member named side. The class should have a zero-argument constructor that initializes this data member to 0. It should have member functions named calcPerimeter() and calcArea() that calculate the perimeter and area of a square respectively, a member function setSide() to set the side of the square, a member function getSide() to return the side, and a member function showData() that displays the square’s side, perimeter, and area. The formula for the area of a square is Area = side * side. The formula for the perimeter of a square is Perimeter = 4 * side.
The class should use appropriate protection levels for the member data and functions. It should also follow “principles of minimalization”: that is, no member data should be part of a class unless it is needed by most member functions of the object. A general rule of thumb is that “if you can easily calculate it, don’t store it.”
Use your class in a program that creates an instance of a Square (utilizing the zero-argument constructor), prompts a user for a side, calls the setSide() function to set the square’s side, and then calls showData() to display the square’s side, perimeter, and area. Your program should allow the user to enter new square dimensions until the user enters -1. Be sure to include appropriate error checking. Does it make sense to enter “abc” as the side of a square? No. Therefore, you should ensure that the user enters numeric data for the side. Negative numbers (other than the -1 to exit) should also be prevented.
Style:
· Your lab should be constructed such that separate files are used: Square.h (your class declaration file), Square.cpp (your class implementation file), and SquareDriver.cpp (the file that contains main() and any other functions that are not part of the class).
The purpose of having separate files is for code resusability. If other developers want to use your class in their programs, they don't need main() as well. They should only have to "#include" your class header file. As such, two separate files for the class are needed to be able to hide the implementation details from other developers. You want other developers to know how to use your class (i.e. what functions are available and how they are called -- this is called the "interface" of the class), but not how they are implemented. If both the interface and the implementation code are in the same file, this cannot be accomplished. When you distribute your class to other developers, the implementation (.cpp) file gets compiled, but the interface (.h) doesn't. That way, the developer can use your class, but he o ...
The Lab assignment will be graded out of 100 points. There are .docxjmindy
The Lab assignment will be graded out of 100 points. There are multiple parts or tasks that make up each Lab.
This document can be downloaded here :
Lab4CFall20v1.docx
The code you need to start with :
Lab4Part1.c
The data file you need :
Lab4giftList.txt
(Note that this file name doesn't match the code so you'll need to adjust that.)
Some tasks ask you to write code, and specify what name to use for the file in NetBeans. You need to use exactly the name that is given (do not change the case, or make any other modification). Remember, the name of the main class must match the filename.
There are further instructions at the bottom (after the questions) about how to save the file from NetBeans in order to be able to turn it in.
For every lab assignment you need to create an answers file. In this answers file you will put in answer any questions that are asked, you will show the output of code that you write and you will reference any code files that you create for a given question. See below for more details about what goes in the answers file.
Your answers document needs to be named with your initials and the last four digits of your ID number and then Lab#answers. So if my initials are JCMT and the last four digits of my ID are 1234, then the answers file for my Lab 4 would be
JCMT1234Lab3answers
.
The ONLY acceptable file formats are Word document, OpenOffice document, and PDF.
Put your last name, first name and UTA ID in the file on the first line.
[-5 deduction if not**]
Label the answers for each question with the number/letter of the question.
Separate each answer from the next answer by at least two blank lines
.
[-5 deduction if not**]
Include EVERY question number/letter combination from the assignment in your answers document. If the question is a coding question telling you to save a file, for example some question numbered 17.b), then in your answers document you should have a line like the following for question 17.b):
17.b) Please see file Lab1Part3.c for this question.”
Put all your question answers the answer document.
If the lab question asks you to show the output of a doing some particular thing with the code, then you must also put a screenshot of the output in the answer document. For output that takes up more than one screen, make multiple pictures so that every screen is recorded. If you do not include the screenshots in your answer document, then the questions that should have had screenshots will be considered “Not answered” and will be awarded ZERO 0 points.
Each task below will instruct you where to put your answers. If the task says to “Save your program as file
XYZ1234Lab1Task1.c
” then this .c file should be turned in as part of the assignment along with the answers file.
Every lab assignment has a given due date. No late labs will be accepted. (Five minutes late is still late.) Lab assignments will be posted on Canvas. If you are unable to turn in your .
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPAli Shah
Exception handling in C# uses four keywords: try, catch, finally, and throw. The try block identifies code that might cause exceptions. The catch block handles exceptions, while finally ensures code is always executed. Exceptions are represented by classes derived from System.Exception, and common exceptions include NullReferenceException and DivideByZeroException. ADO.NET provides objects like SqlConnection and SqlCommand to connect C# applications to SQL Server databases using connection strings. Data can be queried, inserted, and read from databases through these objects.
This document summarizes projects completed by Matt Willmer as part of a .NET Masters program. The projects involved building multi-tier applications using technologies like C#, ASP.NET, Windows Forms, SQL Server, and Visual Studio. Project 1 focused on learning C# features like properties and enumerators. Project 2 involved creating a Windows Forms application for a library management system. Project 3 added database functionality using LINQ to SQL. Project 4 created a web-based presentation layer for the library system using ASP.NET.
Once the Application has started up and you are at the Start Page, s.docxarnit1
Once the Application has started up and you are at the Start Page, select the create a new project option. When presented with the New Project window like the one below, be sure that you have highlighted Console Application under the Templates window. Now give the new project the name INV_GRAB in the Name field, and have the location field pointing to the F:\SAI430 folder you have on the F: drive. The diagram below depicts what your New Project window should look similar to.
Once you have done this, select OK to complete this operation. You may get a "Microsoft Development Environment" message box stating that the project location is not a fully trusted .NET runtime location. You can ignore this and just select OK. You should now see your new project listed in the
Solution
Explorer window on the upper right hand corner of the editor window. You are now ready to begin setting up your form.
STEP 2: Setting Up a Database Connection
Back to Top
The first step now is to set up a database connection with Access and then a data set that can be used to transport the data from the database to the application to be written to a file. For the purposes of this lab and your project, you will only need data from two columns in the ITEMS table of the INVENTORY database, but we will control that with the code written later. The following steps will lead you through the process of setting up the connection.
To begin, you need to add the following three namespaces to the top of your application code:
using System.IO;
using System.Data;
using System.Data.OleDb;
Since you are going to be not only connecting to a database but also writing data to a file, you will need all three of these listed.
Now you can set up the connection to your Access database that you downloaded and put in your folder. The actual connection string is @"Provider=Microsoft.JET.OLEDB.4.0; data source=F:\inventory.mdb". This is a standard connection string for MS Access. You will want to precede this with the command - string conString = so that the finished connection looks like this.
string conString = @"Provider=Microsoft.JET.OLEDB.4.0; data source=F:\SAI430\inventory.mdb";
This is simply defining a string variable named conString and assigning the connection string to it. We will use this variable later.
Now we need to define an OleDbConnection that will be used to connect to the database. To do this you will need to define a connection variable as a new OleDbConnection and point it to the connection string defined in the previous step. Your code should look like the following.
OleDbConnection conn = new OleDbConnection(conString);
Now you can connect and open the database with the following command entered right below the line above.
conn.Open();
Last, we need to declare a variable that will be used later on. Although this really has nothing to do with setting up the database connection, this is as good a place as any to do this. You need to define a single variable named rowCount as an.
systems labOnce the Application has started up and you are at the .docxperryk1
systems lab
Once the Application has started up and you are at the Start Page, select the create a new project option. When presented with the New Project window like the one below, be sure that you have highlighted Console Application under the Templates window. Now give the new project the name INV_GRAB in the Name field, and have the location field pointing to the F:\SAI430 folder you have on the F: drive. The diagram below depicts what your New Project window should look similar to.
Once you have done this, select OK to complete this operation. You may get a "Microsoft Development Environment" message box stating that the project location is not a fully trusted .NET runtime location. You can ignore this and just select OK. You should now see your new project listed in the
Solution
Explorer window on the upper right hand corner of the editor window. You are now ready to begin setting up your form.
STEP 2: Setting Up a Database Connection
Back to Top
The first step now is to set up a database connection with Access and then a data set that can be used to transport the data from the database to the application to be written to a file. For the purposes of this lab and your project, you will only need data from two columns in the ITEMS table of the INVENTORY database, but we will control that with the code written later. The following steps will lead you through the process of setting up the connection.
To begin, you need to add the following three namespaces to the top of your application code:
using System.IO;
using System.Data;
using System.Data.OleDb;
Since you are going to be not only connecting to a database but also writing data to a file, you will need all three of these listed.
Now you can set up the connection to your Access database that you downloaded and put in your folder. The actual connection string is @"Provider=Microsoft.JET.OLEDB.4.0; data source=F:\inventory.mdb". This is a standard connection string for MS Access. You will want to precede this with the command - string conString = so that the finished connection looks like this.
string conString = @"Provider=Microsoft.JET.OLEDB.4.0; data source=F:\SAI430\inventory.mdb";
This is simply defining a string variable named conString and assigning the connection string to it. We will use this variable later.
Now we need to define an OleDbConnection that will be used to connect to the database. To do this you will need to define a connection variable as a new OleDbConnection and point it to the connection string defined in the previous step. Your code should look like the following.
OleDbConnection conn = new OleDbConnection(conString);
Now you can connect and open the database with the following command entered right below the line above.
conn.Open();
Last, we need to declare a variable that will be used later on. Although this really has nothing to do with setting up the database connection, this is as good a place as any to do this. You need to define a single variable named ro.
This tutorial introduces programming in Visual Basic 6.0 through a series of activities that demonstrate the main control structures: sequence, selection (binary and multiway), and iteration (pre- and post-test). The activities guide students to implement fully tested and documented software solutions in a methodical manner, meeting the intended learning outcomes. The tutorial begins by having students set up a project template and main menu to organize their work. Subsequent activities introduce key concepts like variables, data types, functions, and event handlers through hands-on exercises creating programs like a calculator, color changer, and message/input boxes.
C++ Programming Class Creation Program Assignment InstructionsTawnaDelatorrejs
C++ Programming: Class Creation Program Assignment Instructions
Overview
The purpose of this assignment is to give you some practice with creating your own classes. This program serves as the basis for all of the other programming assignments in this class and your future Computer Science classes.
Instructions
Construct a class named Square that has a floating-point data member named side. The class should have a zero-argument constructor that initializes this data member to 0. It should have member functions named calcPerimeter() and calcArea() that calculate the perimeter and area of a square respectively, a member function setSide() to set the side of the square, a member function getSide() to return the side, and a member function showData() that displays the square’s side, perimeter, and area. The formula for the area of a square is Area = side * side. The formula for the perimeter of a square is Perimeter = 4 * side.
The class should use appropriate protection levels for the member data and functions. It should also follow “principles of minimalization”: that is, no member data should be part of a class unless it is needed by most member functions of the object. A general rule of thumb is that “if you can easily calculate it, don’t store it.”
Use your class in a program that creates an instance of a Square (utilizing the zero-argument constructor), prompts a user for a side, calls the setSide() function to set the square’s side, and then calls showData() to display the square’s side, perimeter, and area. Your program should allow the user to enter new square dimensions until the user enters -1. Be sure to include appropriate error checking. Does it make sense to enter “abc” as the side of a square? No. Therefore, you should ensure that the user enters numeric data for the side. Negative numbers (other than the -1 to exit) should also be prevented.
Style:
· Your lab should be constructed such that separate files are used: Square.h (your class declaration file), Square.cpp (your class implementation file), and SquareDriver.cpp (the file that contains main() and any other functions that are not part of the class).
The purpose of having separate files is for code resusability. If other developers want to use your class in their programs, they don't need main() as well. They should only have to "#include" your class header file. As such, two separate files for the class are needed to be able to hide the implementation details from other developers. You want other developers to know how to use your class (i.e. what functions are available and how they are called -- this is called the "interface" of the class), but not how they are implemented. If both the interface and the implementation code are in the same file, this cannot be accomplished. When you distribute your class to other developers, the implementation (.cpp) file gets compiled, but the interface (.h) doesn't. That way, the developer can use your class, but he o ...
The Lab assignment will be graded out of 100 points. There are .docxjmindy
The Lab assignment will be graded out of 100 points. There are multiple parts or tasks that make up each Lab.
This document can be downloaded here :
Lab4CFall20v1.docx
The code you need to start with :
Lab4Part1.c
The data file you need :
Lab4giftList.txt
(Note that this file name doesn't match the code so you'll need to adjust that.)
Some tasks ask you to write code, and specify what name to use for the file in NetBeans. You need to use exactly the name that is given (do not change the case, or make any other modification). Remember, the name of the main class must match the filename.
There are further instructions at the bottom (after the questions) about how to save the file from NetBeans in order to be able to turn it in.
For every lab assignment you need to create an answers file. In this answers file you will put in answer any questions that are asked, you will show the output of code that you write and you will reference any code files that you create for a given question. See below for more details about what goes in the answers file.
Your answers document needs to be named with your initials and the last four digits of your ID number and then Lab#answers. So if my initials are JCMT and the last four digits of my ID are 1234, then the answers file for my Lab 4 would be
JCMT1234Lab3answers
.
The ONLY acceptable file formats are Word document, OpenOffice document, and PDF.
Put your last name, first name and UTA ID in the file on the first line.
[-5 deduction if not**]
Label the answers for each question with the number/letter of the question.
Separate each answer from the next answer by at least two blank lines
.
[-5 deduction if not**]
Include EVERY question number/letter combination from the assignment in your answers document. If the question is a coding question telling you to save a file, for example some question numbered 17.b), then in your answers document you should have a line like the following for question 17.b):
17.b) Please see file Lab1Part3.c for this question.”
Put all your question answers the answer document.
If the lab question asks you to show the output of a doing some particular thing with the code, then you must also put a screenshot of the output in the answer document. For output that takes up more than one screen, make multiple pictures so that every screen is recorded. If you do not include the screenshots in your answer document, then the questions that should have had screenshots will be considered “Not answered” and will be awarded ZERO 0 points.
Each task below will instruct you where to put your answers. If the task says to “Save your program as file
XYZ1234Lab1Task1.c
” then this .c file should be turned in as part of the assignment along with the answers file.
Every lab assignment has a given due date. No late labs will be accepted. (Five minutes late is still late.) Lab assignments will be posted on Canvas. If you are unable to turn in your .
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPAli Shah
Exception handling in C# uses four keywords: try, catch, finally, and throw. The try block identifies code that might cause exceptions. The catch block handles exceptions, while finally ensures code is always executed. Exceptions are represented by classes derived from System.Exception, and common exceptions include NullReferenceException and DivideByZeroException. ADO.NET provides objects like SqlConnection and SqlCommand to connect C# applications to SQL Server databases using connection strings. Data can be queried, inserted, and read from databases through these objects.
This document summarizes projects completed by Matt Willmer as part of a .NET Masters program. The projects involved building multi-tier applications using technologies like C#, ASP.NET, Windows Forms, SQL Server, and Visual Studio. Project 1 focused on learning C# features like properties and enumerators. Project 2 involved creating a Windows Forms application for a library management system. Project 3 added database functionality using LINQ to SQL. Project 4 created a web-based presentation layer for the library system using ASP.NET.
Once the Application has started up and you are at the Start Page, s.docxarnit1
Once the Application has started up and you are at the Start Page, select the create a new project option. When presented with the New Project window like the one below, be sure that you have highlighted Console Application under the Templates window. Now give the new project the name INV_GRAB in the Name field, and have the location field pointing to the F:\SAI430 folder you have on the F: drive. The diagram below depicts what your New Project window should look similar to.
Once you have done this, select OK to complete this operation. You may get a "Microsoft Development Environment" message box stating that the project location is not a fully trusted .NET runtime location. You can ignore this and just select OK. You should now see your new project listed in the
Solution
Explorer window on the upper right hand corner of the editor window. You are now ready to begin setting up your form.
STEP 2: Setting Up a Database Connection
Back to Top
The first step now is to set up a database connection with Access and then a data set that can be used to transport the data from the database to the application to be written to a file. For the purposes of this lab and your project, you will only need data from two columns in the ITEMS table of the INVENTORY database, but we will control that with the code written later. The following steps will lead you through the process of setting up the connection.
To begin, you need to add the following three namespaces to the top of your application code:
using System.IO;
using System.Data;
using System.Data.OleDb;
Since you are going to be not only connecting to a database but also writing data to a file, you will need all three of these listed.
Now you can set up the connection to your Access database that you downloaded and put in your folder. The actual connection string is @"Provider=Microsoft.JET.OLEDB.4.0; data source=F:\inventory.mdb". This is a standard connection string for MS Access. You will want to precede this with the command - string conString = so that the finished connection looks like this.
string conString = @"Provider=Microsoft.JET.OLEDB.4.0; data source=F:\SAI430\inventory.mdb";
This is simply defining a string variable named conString and assigning the connection string to it. We will use this variable later.
Now we need to define an OleDbConnection that will be used to connect to the database. To do this you will need to define a connection variable as a new OleDbConnection and point it to the connection string defined in the previous step. Your code should look like the following.
OleDbConnection conn = new OleDbConnection(conString);
Now you can connect and open the database with the following command entered right below the line above.
conn.Open();
Last, we need to declare a variable that will be used later on. Although this really has nothing to do with setting up the database connection, this is as good a place as any to do this. You need to define a single variable named rowCount as an.
systems labOnce the Application has started up and you are at the .docxperryk1
systems lab
Once the Application has started up and you are at the Start Page, select the create a new project option. When presented with the New Project window like the one below, be sure that you have highlighted Console Application under the Templates window. Now give the new project the name INV_GRAB in the Name field, and have the location field pointing to the F:\SAI430 folder you have on the F: drive. The diagram below depicts what your New Project window should look similar to.
Once you have done this, select OK to complete this operation. You may get a "Microsoft Development Environment" message box stating that the project location is not a fully trusted .NET runtime location. You can ignore this and just select OK. You should now see your new project listed in the
Solution
Explorer window on the upper right hand corner of the editor window. You are now ready to begin setting up your form.
STEP 2: Setting Up a Database Connection
Back to Top
The first step now is to set up a database connection with Access and then a data set that can be used to transport the data from the database to the application to be written to a file. For the purposes of this lab and your project, you will only need data from two columns in the ITEMS table of the INVENTORY database, but we will control that with the code written later. The following steps will lead you through the process of setting up the connection.
To begin, you need to add the following three namespaces to the top of your application code:
using System.IO;
using System.Data;
using System.Data.OleDb;
Since you are going to be not only connecting to a database but also writing data to a file, you will need all three of these listed.
Now you can set up the connection to your Access database that you downloaded and put in your folder. The actual connection string is @"Provider=Microsoft.JET.OLEDB.4.0; data source=F:\inventory.mdb". This is a standard connection string for MS Access. You will want to precede this with the command - string conString = so that the finished connection looks like this.
string conString = @"Provider=Microsoft.JET.OLEDB.4.0; data source=F:\SAI430\inventory.mdb";
This is simply defining a string variable named conString and assigning the connection string to it. We will use this variable later.
Now we need to define an OleDbConnection that will be used to connect to the database. To do this you will need to define a connection variable as a new OleDbConnection and point it to the connection string defined in the previous step. Your code should look like the following.
OleDbConnection conn = new OleDbConnection(conString);
Now you can connect and open the database with the following command entered right below the line above.
conn.Open();
Last, we need to declare a variable that will be used later on. Although this really has nothing to do with setting up the database connection, this is as good a place as any to do this. You need to define a single variable named ro.
This tutorial introduces programming in Visual Basic 6.0 through a series of activities that demonstrate the main control structures: sequence, selection (binary and multiway), and iteration (pre- and post-test). The activities guide students to implement fully tested and documented software solutions in a methodical manner, meeting the intended learning outcomes. The tutorial begins by having students set up a project template and main menu to organize their work. Subsequent activities introduce key concepts like variables, data types, functions, and event handlers through hands-on exercises creating programs like a calculator, color changer, and message/input boxes.
This document provides an overview of implementing a 3-tier architecture in ASP.NET using C#. It describes the 3 tiers - presentation layer, business logic layer, and data access layer. The presentation layer handles user input/output. The business logic layer contains application logic and communicates with the data access layer. The data access layer connects to the database and performs CRUD operations. The document outlines setting up the project structure with App_Code/BusinessLayer and App_Code/DataAccessLayer folders and creating sample BusinessLogic and DataAccess classes.
This document provides instructions for creating a traceability report in Rational Publishing Engine (RPE) that links together requirements from Rational Requirements Composer (RRC), test plans and test cases from Rational Quality Manager (RQM), and work items from Rational Team Concert (RTC). It describes creating an XML data source, iterating through each module to display attributes in tables, adding hyperlinks between elements, and defining a master page with a header and footer.
PT1420: File Access and Visual Basic
Page 1
This lab examines how to work with a file by writing Visual Basic code. Read the following
programming problem prior to completing the lab.
Write and design a simple program that will take 3 pieces of data and write it to a file. Create
variables and set them equal to the appropriate values:
Declare string firstName = “xxx”
Declare string lastName = “xxx”
Declare integer age = your age
Write this information to a file called myRecords.txt. Next, read this information from
the file and print it to the screen.
Step 1: Create a new Visual Basic workspace and add the following code:
Module Module1
Sub Main()
Dim firstName As String = "XXXX"
Dim lastName As String = "XXX"
Dim age As Integer = ####
Dim writer As System.IO.StreamWriter = System.IO.File.CreateText("myRecords.txt")
writer.WriteLine(firstName & " " & lastName & " " & age)
writer.Close()
Dim reader As System.IO.StreamReader = System.IO.File.OpenText("myRecords.txt")
Dim myInfo As String = reader.ReadLine()
Console.WriteLine(myInfo)
PT1420: File Access and Visual Basic
Page 2
reader.Close()
'this causes a pause so you can see your program
Console.Write("Press enter to continue...")
Console.ReadLine()
End Sub
End Module
Your module looks like this:
PT1420: File Access and Visual Basic
Page 3
Step 2: Change the values of the variables to your records. Your module looks like this:
Step 3: Run your program so that it works properly. Your output might look as follows:
PT1420: File Access and Visual Basic
Page 4
Step 4: Locate the .txt file in the bin\debug folder, and view your .txt file. Your output might
look as follows:
PT1420: File Access and Visual Basic
Page 5
Step 5: Submit the Visual Basic code as a compressed (zipped) folder using the following steps:
a. Open Windows Explorer --> Start --> All Programs --> Accessories --> Windows Explorer.
Your Windows Explorer might look as follows:
...
Open a new project in Visual Studio Community and name it in the form.pdfNathan2rSPeakes
Open a new project in Visual Studio Community and name it in the form of Last name
CourseSection Assignment3. You are expected to use Loops and IO filestreams in this program.
Write comments to explain what each statement does, and how it achieves the desired results
(Remember to review the rubric posted under Course Materials to understand how your program
will be graded) PART 1: Write a program in C + that permits users to enter the following
information about your company's five employees and writes the following information to the
file (data.txt). Employee ID. Name Years with company Hourly Wages All information must be
displayed in a well formatted manner, so you can put in relevant manipulators for this purpose.
Run your program, put in employee information (for 5 employees), and verify if you have a txt
file as required. PART 2: At this point you must have a . ta file with information of 5 employees.
Go back to your C + + program (from part 1). put the entire existing program from part I within
block comstents / ..... %/ Now write a new program for part 2 (in that same C + + file) as per
instractions given below: Write a C + program that reads this file data.txt, one line at a time, asks
for the number of hours worked by each employee per month and calculates their total pay for
that month. So for each of the employee records that stream in, your program must ask user:
Enter hours worked by (name of employee)t When user puts in the answer, program must
calculate the total salary and display on the computer sereen as " The salary of (name) is S
(salary). EXIRA CREDIT (10 points) Make provisions in your part 2 program for the salary
information (along with some other employee details) to be stored in a new file called
(February_salary.txt). Your information must be saved to the file in the following format. ID no.
Name Hourly wages Salary.
This document describes concepts related to working with data in Visual Basic .NET, including:
1. Setting a connection string involves specifying the data provider technology and data source location in the ConnectionString property of a Connection object, separated by a semicolon. An example connects to an Access database on the C drive.
2. Record navigation in a DataSet can be done by incrementing or decrementing a counter variable and calling a NavigateRecords subroutine. Buttons can move to the first, last, previous, and next records.
3. Arrays can be fixed-size or dynamic. Fixed arrays have a set size declared while dynamic arrays can be resized at runtime using ReDim. Multidimensional arrays
Lab #9 and 10 Web Server ProgrammingCreate a New Folder I s.docxDIPESH30
Lab #9 and 10: Web Server Programming
Create a New Folder: I suggest that youcreate a new folder named Lab 9 and 10 to store your 13 or more files for this lab.
PHP Functions dedicated to working with MySQL databases:
PHP Function
Description
mysql_connect()
Used to connect to a database including user ID and password for database user.
mysql_select_db()
Set the default database that is to be used.
mysql_query()
Used for general query (or database actions) such as performing CREATE TABLE, SELECT, INSERT, UPDATE, or DELETE actions.
mysql_fetch_assoc()
Allows an entire row (record) of data to be retrieved and converted to an associative array. This allows each field of a record to be retrieved using the field name itself as the array index.
mysql_close()
Closing access to an opened MySQL database.
Your Topic for this Lab: Decide on a topic for this lab based on your entrepreneurship (if feasible). In my example, I created an inventory program for a company called Kettel’s Auto Parts. (The idea was inspired by a business once owned by my great Uncle Joe back in the 1940’s – he may have kept records differently back then) You might consider an inventory for your company. The goal is to keep track of items in a database.
Dealing with Large Programs: This is the most ambitions PHP program we have tackled so far. If you attempt to consider this endeavor as a whole, it may be overwhelming to you. So, here is the trick for handling large programs. Break them into small pieces, and just consider one little piece at a time. This program is divided into 13 modules. If you can write a small program, then you can write a large program broken into many small pieces. I suggest you skim over this assignment so you get an idea of where you are headed. As in the past, this example is just a paradigm – your program may look completely different.
Lab #9 – Parts I to V: The first week, plan to submit a Word document with a link to your “Viewing Site” (Part V). Be sure to include a graphic banner and a least one “time” field using the PHP now() function.
Lab #10 – Finish the Program: The second week plan to submit a Word document with a link to the menu. Your Add records, Edit Records, Delete Records and View by Sorted and Filtered order should be functioning.
Program Files for this Lab: In my example I wrote the following 13 modules to make up the Kettel’s Auto Parts Inventory Program:
parts_form.html – Part I
parts_banner.php – Part I
parts_include.php – Part II
parts_reset.php – Part III
parts_save_rec.php – Part IV
parts_view_all.php – Part V
Parts_menu.html – Part VI
parts_view.php
parts_delete.php
parts_delete_entry.php
parts_edit.php
parts_edit_entry.php
parts_edit_save.php
Hierarchy Chart: Do you remember the hierarchy charts from Chapter 2 of CST 170? When a program has many modules calling other modules, programmers often use hierarchy carts to show a picture of how the modules relate to each other. Don’t confuse the hierarchy ...
The document discusses interfacing with end users in ASP.NET. It provides two programming models - Web Forms and WCF Services. Web Forms enables creating user interfaces and application logic, while WCF Services enables remote server-side functionality access. It also discusses creating a basic web form in ASP.NET that displays the current date and time when a button is clicked to demonstrate the Web Forms model. Common controls like labels, textboxes, buttons are also summarized with their properties and events.
Be sure to read all of Chapters 8 and 9 before starting this assignm.docxaman341480
Be sure to read all of Chapters 8 and 9 before starting this assignment. Your job is to update your payroll program for Armadillo Automotive Group to use a C++ class. Each employee class object should hold the master file information for one employee. You can assume that the company has exactly 6 employees. Use an array of employee objects to hold the master file information for the company employees.
Do not put any pay information, including hours worked, in an Employee object. You might want to create a paycheck struct or object to hold pay information for one employee (this could include the hours worked).
DO NOT DO ANY INPUT OR OUTPUT IN ANY CLASS MEMBER FUNCTION.
The employee information and hours worked will come from input files instead of from the keyboard.
Employee class
Create a class to represent the master file information for one employee. Start with this partial Employee class:
class Employee
{
private:
int id; // employee ID
string name; // employee name
double hourlyPay; // pay per hour
int numDeps; // number of dependents
int type; // employee type
public:
Employee( int initId=0, string initName="",
double initHourlyPay=0.0,
int initNumDeps=0, int initType=0 ); // Constructor
bool set(int newId, string newName, double newHourlyPay,
int newNumDeps, int newType);
};
Employee::Employee( int initId, string initName,
double initHourlyPay,
int initNumDeps, int initType )
{
bool status = set( initId, initName, initHourlyPay,
initNumDeps, initType );
if ( !status )
{
id = 0;
name = "";
hourlyPay = 0.0;
numDeps = 0;
type = 0;
}
}
bool Employee::set( int newId, string newName, double newHourlyPay,
int newNumDeps, int newType )
{
bool status = false;
if ( newId > 0 && newHourlyPay > 0 && newNumDeps >= 0 &&
newType >= 0 && newType <= 1 )
{
status = true;
id = newId;
name = newName;
hourlyPay = newHourlyPay;
numDeps = newNumDeps;
type = newType;
}
return status;
}
Note that the constructor and set functions do validation on the data that is to be stored in the Employee object. They are similar to the validation in the Rectangle class from the textbook in
Section 7.11 Focus on Software Engineering: Separating class Specification, Implementation and Client Code.
For a more detailed discussion of validation for class objects, and the Employee class validation, see
Employee Data Validation
.
You should be able to copy this class into your editor by highlighting the code, making a copy of it (ctrl-c in Windows), and then pasting the code into your editor window.
Do not make any changes to the data members of the class. Do not add any new data members to the class. Do not make any changes to t ...
Open a new project in Visual Studio Community and name it in the form.pdflonkarhrishikesh
Open a new project in Visual Studio Community and name it in the form of Last
name_CourseSection_Assignment 3. You are expected to use Loops and IO filestreams in this
program. Write comments to explain what each statement does, and how it achieves the desired
results (Remember to review the rubric posted under Course Materials to understand how your
program will be graded) PART 1: Write a program in C + that permits users to enter the
following information about your company's five employees and writes the following
information to the file (data.txt). Employee ID. Name Years with company Hourly Wages All
information must be displayed in a well formatted manner, so you can put in relevant
manipulators for this purpose. Run your program, put in employee information (for 5
employees), and verify if you have a txt file as required. PART 2: At this point you must have a .
tat file with information of 5 employees. Go back to your C + + programt (from part 1). put the
entire existing program from part I within block comstents / .... % , Now write a new program for
part 2 (in that same C + + file) as per instractions given below: Write a C + + program that reads
this file data. txt , one line at a time, asks for the number of hours worked by each employee per
month and calculates their total pay for that month. So for each of the employee records that
stream in, your program must ask user: Enter hours worked by (mame of employee): When user
puts in the answer, program must calculate the total salary and display on the computer screen as
* The salary of (name) is S (salary). EXIRA CREDIT ( 10 points) Make provisions in your part
2 program for the salary information (along with some other employee details) to be stored in a
new file called (February_salary.txt). Your information must be saved to the file in the following
format. ID no. Name Hourly wages Salary.
Access tips access and sql part 6 dynamic reportsquest2900
This document summarizes part 6 of a tutorial on creating dynamic reports in Microsoft Access. It describes how to build a dialog box that allows users to filter and sort the data displayed in an Access report. The dialog box uses combo boxes and list boxes to let users select filter criteria for fields like office and department. The code constructs SQL statements to dynamically update the report's filter property based on the user's selections. It also explains how to add sorting options so users can choose up to three fields to sort the report data.
The document provides definitions for various computer science and programming terms related to C++ including data types, operators, statements, functions, classes, inheritance, and more. It defines terms such as #include, abstract class, aggregate, alias, allocation, argument, array, assignment, base class, bit, bool, break, byte, call by reference, call by value, case, char, cin, class, class layout, class member, class template, comments, compiler, const, constructor, continue, copy constructor, cout, data structure, debugger, declaration, default argument, definition, delete operator, derived class, destructor, do, double, dynamic memory allocation, else, endl, explicit, expression, expression statement
I am Irene M. I am a C++ Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from from California, USA. I have been helping students with their homework for the past 10 years. I solve homework related to C++.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with C++ Homework.
This presentation is a part of the COP2272C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce students to the C++ language and the fundamentals of object orientated programming..
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
Here is the class Book with the requested attributes and member functions:
#include <iostream>
using namespace std;
class Book {
private:
string title;
string author;
string publisher;
float price;
public:
Book() {
title = "No title";
author = "No author";
publisher = "No publisher";
price = 0.0;
}
void display_data() {
cout << "Title: " << title << endl;
cout << "Author: " << author << endl;
cout << "Publisher: " << publisher << endl;
cout << "Price: " << price << endl;
}
The document provides information about C programming language and its features. It discusses the basic structure of a C program which includes documentation, link, definition, global declaration, main function, and sub-program sections. It also describes the four steps to execute a C program: create, compile, link, and execute. Different forms of the main statement in C are discussed including main(), main(void), int main(), void main(), void main(void), and int main(void).
Solutions manual for c++ programming from problem analysis to program design ...Warren0989
Solutions Manual for C++ Programming From Problem Analysis to Program Design 8th Edition by Malik IBSN 9781337102087
Download at: https://goo.gl/nxo13w
People also search:
c++ programming from problem analysis to program design 7th edition pdf
c++ programming malik 8th edition pdf
c++ programming from problem analysis to program design 8th edition pdf download
c++ programming from problem analysis to program design exercise answers
c++ programming from problem analysis to program design solution manual
c++ programming program design including data structures 7th edition pdf download
c++ programming from problem analysis to program design 6th edition pdf
c++ programming from problem analysis to program design 7th edition solution manual
.NET is designed to solve problems that have plagued programmers in the past like incompatibilities between programming languages and technologies. It provides a common language runtime and type system that allows different languages to work together. The .NET Framework handles many common programming tasks like serialization automatically through metadata and provides a large class library for common functions.
I am Thanasis F. I am an Online C++ Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from Harvard University. I have been helping students with their homework for the past 6 years. I solve homework related to Online C++.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with Online C++ Homework.
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdfmallik3000
Explain how The Capitol Building (in D.C.) is a reflection of Greco-Roman architecture.
Solution
Capitol Building is a fine example of the 19th-century neoclassical architecture, the Capitol
Building’s interior is dominated by Greco- Roman designs, and contains a profusion of frescoes,
murals. It has five floors, of which the first level contains committee rooms and spaces allocated
to various congressional officers. It also Consists of cast-iron dome, topped with Thomas
Crawford\'s colossal statue. The dome is famed for its odd acoustic sounds. The white colour is
also significance of romans..
Exercise 14-3
GURLEY CORPORATION
Comparative Condensed Balance Sheets
December 31
2017
2016
2017
2016
Increase
(Decrease)
Percentage
Change from 2016
Assets
Current assets
$ 73,500
$ 78,200
Property, plant & equipment (net)
97,100
88,200
Intangibles
Total assets
Liabilities and stockholders\' Equity
Current liabilities
$ 41,000
$ 48,400
Long-term liabilities
140,000
150,000
Stockholders\' equity
Total liabilities and stockholders\' equity
Amount
Percent
Assets
Current assets
$ 73,500
Property, plant, and equipment (net)
97,100
Intangibles
Total assets
Liabilities and stockholders\' equity
Current liabilities
$ 41,000
Long-term liabilities
140,000
Stockholders\' equity
Total liabilities and stockholders\' equity
Exercise 14-3 The comparative condensed balance sheets of Gurley Corporation are presented
below.
GURLEY CORPORATION
Comparative Condensed Balance Sheets
December 31
2017
2016Assets Current assets$ 73,500$ 78,200 Property, plant, and equipment
(net)97,10088,200 Intangibles27,00042,000 Total assets$ 197,600$ 208,400Liabilities and
stockholders’ equity Current liabilities$ 41,000$ 48,400 Long-term
liabilities140,000150,000 Stockholders’ equity16,60010,000 Total liabilities and
stockholders’ equity$ 197,600$ 208,400
(a)
Prepare a horizontal analysis of the balance sheet data for Gurley Corporation using 2016 as a
base. (Enter negative amounts and percentages using either a negative sign preceding the
number e.g. -45, -45% or parentheses e.g. (45), (45%).Round percentages to 1 decimal place,
e.g. 12.3%.)
GURLEY CORPORATION
Condensed Balance Sheets
For the Year Ended December 31 For the Quarter Ended December
31 December 31
2017
2016
Increase
(Decrease)
Percentage
Change from 2016
Assets
Current assets
$ 73,500
$ 78,200$
%
Property, plant & equipment (net)
97,100
88,200
%
Intangibles27,00042,000
%
Total assets$ 197,600$ 208,400$
%
Liabilities and stockholders\' Equity
Current liabilities
$ 41,000
$ 48,400$
%
Long-term liabilities
140,000
150,000
%
Stockholders\' equity16,60010,000
%
Total liabilities and stockholders\' equity$ 197,600$ 208,400$
%
(b)
Prepare a vertical analysis of the balance sheet data for Gurley Corporation in columnar form
for 2017. (Round percentages to 1 decimal place, e.g. 12.3%.)
GURLEY CORPORATION
Condensed Balance Sheet
For the Quarter Ended December 31, 2017 December 31, 2017
For the Year Ended December 31, 2017
Amount
Percent
Assets
Current assets
$ 73,500
%
Property, plant, and equipment (net)
97,100
%
Intangibles27,000
%
Total assets$ 197,600
%
Liabilities and stockholders\' equity
Current liabilities
$ 41,000
%
Long-term liabilities
140,000
%
Stockholders\' equity16,600
%
Total liabilities and stockholders\' equity$ 197,600
%
Solution
GURLEY CORPORATION Condensed Balance Sheets December 31 2017 2016
Increase (Decrease) % change Assets: Current assets 73500 78200 -4700 -6.0% Property,
plant & equipment (net) 97100 88200 8900 10.1% Intangibles 27000 42000 -15000 -35.7%
Total assets 197600 208400 -10800 -5.2% Lia.
More Related Content
Similar to I am having trouble writing the individual files for part 1, which i.pdf
This document provides an overview of implementing a 3-tier architecture in ASP.NET using C#. It describes the 3 tiers - presentation layer, business logic layer, and data access layer. The presentation layer handles user input/output. The business logic layer contains application logic and communicates with the data access layer. The data access layer connects to the database and performs CRUD operations. The document outlines setting up the project structure with App_Code/BusinessLayer and App_Code/DataAccessLayer folders and creating sample BusinessLogic and DataAccess classes.
This document provides instructions for creating a traceability report in Rational Publishing Engine (RPE) that links together requirements from Rational Requirements Composer (RRC), test plans and test cases from Rational Quality Manager (RQM), and work items from Rational Team Concert (RTC). It describes creating an XML data source, iterating through each module to display attributes in tables, adding hyperlinks between elements, and defining a master page with a header and footer.
PT1420: File Access and Visual Basic
Page 1
This lab examines how to work with a file by writing Visual Basic code. Read the following
programming problem prior to completing the lab.
Write and design a simple program that will take 3 pieces of data and write it to a file. Create
variables and set them equal to the appropriate values:
Declare string firstName = “xxx”
Declare string lastName = “xxx”
Declare integer age = your age
Write this information to a file called myRecords.txt. Next, read this information from
the file and print it to the screen.
Step 1: Create a new Visual Basic workspace and add the following code:
Module Module1
Sub Main()
Dim firstName As String = "XXXX"
Dim lastName As String = "XXX"
Dim age As Integer = ####
Dim writer As System.IO.StreamWriter = System.IO.File.CreateText("myRecords.txt")
writer.WriteLine(firstName & " " & lastName & " " & age)
writer.Close()
Dim reader As System.IO.StreamReader = System.IO.File.OpenText("myRecords.txt")
Dim myInfo As String = reader.ReadLine()
Console.WriteLine(myInfo)
PT1420: File Access and Visual Basic
Page 2
reader.Close()
'this causes a pause so you can see your program
Console.Write("Press enter to continue...")
Console.ReadLine()
End Sub
End Module
Your module looks like this:
PT1420: File Access and Visual Basic
Page 3
Step 2: Change the values of the variables to your records. Your module looks like this:
Step 3: Run your program so that it works properly. Your output might look as follows:
PT1420: File Access and Visual Basic
Page 4
Step 4: Locate the .txt file in the bin\debug folder, and view your .txt file. Your output might
look as follows:
PT1420: File Access and Visual Basic
Page 5
Step 5: Submit the Visual Basic code as a compressed (zipped) folder using the following steps:
a. Open Windows Explorer --> Start --> All Programs --> Accessories --> Windows Explorer.
Your Windows Explorer might look as follows:
...
Open a new project in Visual Studio Community and name it in the form.pdfNathan2rSPeakes
Open a new project in Visual Studio Community and name it in the form of Last name
CourseSection Assignment3. You are expected to use Loops and IO filestreams in this program.
Write comments to explain what each statement does, and how it achieves the desired results
(Remember to review the rubric posted under Course Materials to understand how your program
will be graded) PART 1: Write a program in C + that permits users to enter the following
information about your company's five employees and writes the following information to the
file (data.txt). Employee ID. Name Years with company Hourly Wages All information must be
displayed in a well formatted manner, so you can put in relevant manipulators for this purpose.
Run your program, put in employee information (for 5 employees), and verify if you have a txt
file as required. PART 2: At this point you must have a . ta file with information of 5 employees.
Go back to your C + + program (from part 1). put the entire existing program from part I within
block comstents / ..... %/ Now write a new program for part 2 (in that same C + + file) as per
instractions given below: Write a C + program that reads this file data.txt, one line at a time, asks
for the number of hours worked by each employee per month and calculates their total pay for
that month. So for each of the employee records that stream in, your program must ask user:
Enter hours worked by (name of employee)t When user puts in the answer, program must
calculate the total salary and display on the computer sereen as " The salary of (name) is S
(salary). EXIRA CREDIT (10 points) Make provisions in your part 2 program for the salary
information (along with some other employee details) to be stored in a new file called
(February_salary.txt). Your information must be saved to the file in the following format. ID no.
Name Hourly wages Salary.
This document describes concepts related to working with data in Visual Basic .NET, including:
1. Setting a connection string involves specifying the data provider technology and data source location in the ConnectionString property of a Connection object, separated by a semicolon. An example connects to an Access database on the C drive.
2. Record navigation in a DataSet can be done by incrementing or decrementing a counter variable and calling a NavigateRecords subroutine. Buttons can move to the first, last, previous, and next records.
3. Arrays can be fixed-size or dynamic. Fixed arrays have a set size declared while dynamic arrays can be resized at runtime using ReDim. Multidimensional arrays
Lab #9 and 10 Web Server ProgrammingCreate a New Folder I s.docxDIPESH30
Lab #9 and 10: Web Server Programming
Create a New Folder: I suggest that youcreate a new folder named Lab 9 and 10 to store your 13 or more files for this lab.
PHP Functions dedicated to working with MySQL databases:
PHP Function
Description
mysql_connect()
Used to connect to a database including user ID and password for database user.
mysql_select_db()
Set the default database that is to be used.
mysql_query()
Used for general query (or database actions) such as performing CREATE TABLE, SELECT, INSERT, UPDATE, or DELETE actions.
mysql_fetch_assoc()
Allows an entire row (record) of data to be retrieved and converted to an associative array. This allows each field of a record to be retrieved using the field name itself as the array index.
mysql_close()
Closing access to an opened MySQL database.
Your Topic for this Lab: Decide on a topic for this lab based on your entrepreneurship (if feasible). In my example, I created an inventory program for a company called Kettel’s Auto Parts. (The idea was inspired by a business once owned by my great Uncle Joe back in the 1940’s – he may have kept records differently back then) You might consider an inventory for your company. The goal is to keep track of items in a database.
Dealing with Large Programs: This is the most ambitions PHP program we have tackled so far. If you attempt to consider this endeavor as a whole, it may be overwhelming to you. So, here is the trick for handling large programs. Break them into small pieces, and just consider one little piece at a time. This program is divided into 13 modules. If you can write a small program, then you can write a large program broken into many small pieces. I suggest you skim over this assignment so you get an idea of where you are headed. As in the past, this example is just a paradigm – your program may look completely different.
Lab #9 – Parts I to V: The first week, plan to submit a Word document with a link to your “Viewing Site” (Part V). Be sure to include a graphic banner and a least one “time” field using the PHP now() function.
Lab #10 – Finish the Program: The second week plan to submit a Word document with a link to the menu. Your Add records, Edit Records, Delete Records and View by Sorted and Filtered order should be functioning.
Program Files for this Lab: In my example I wrote the following 13 modules to make up the Kettel’s Auto Parts Inventory Program:
parts_form.html – Part I
parts_banner.php – Part I
parts_include.php – Part II
parts_reset.php – Part III
parts_save_rec.php – Part IV
parts_view_all.php – Part V
Parts_menu.html – Part VI
parts_view.php
parts_delete.php
parts_delete_entry.php
parts_edit.php
parts_edit_entry.php
parts_edit_save.php
Hierarchy Chart: Do you remember the hierarchy charts from Chapter 2 of CST 170? When a program has many modules calling other modules, programmers often use hierarchy carts to show a picture of how the modules relate to each other. Don’t confuse the hierarchy ...
The document discusses interfacing with end users in ASP.NET. It provides two programming models - Web Forms and WCF Services. Web Forms enables creating user interfaces and application logic, while WCF Services enables remote server-side functionality access. It also discusses creating a basic web form in ASP.NET that displays the current date and time when a button is clicked to demonstrate the Web Forms model. Common controls like labels, textboxes, buttons are also summarized with their properties and events.
Be sure to read all of Chapters 8 and 9 before starting this assignm.docxaman341480
Be sure to read all of Chapters 8 and 9 before starting this assignment. Your job is to update your payroll program for Armadillo Automotive Group to use a C++ class. Each employee class object should hold the master file information for one employee. You can assume that the company has exactly 6 employees. Use an array of employee objects to hold the master file information for the company employees.
Do not put any pay information, including hours worked, in an Employee object. You might want to create a paycheck struct or object to hold pay information for one employee (this could include the hours worked).
DO NOT DO ANY INPUT OR OUTPUT IN ANY CLASS MEMBER FUNCTION.
The employee information and hours worked will come from input files instead of from the keyboard.
Employee class
Create a class to represent the master file information for one employee. Start with this partial Employee class:
class Employee
{
private:
int id; // employee ID
string name; // employee name
double hourlyPay; // pay per hour
int numDeps; // number of dependents
int type; // employee type
public:
Employee( int initId=0, string initName="",
double initHourlyPay=0.0,
int initNumDeps=0, int initType=0 ); // Constructor
bool set(int newId, string newName, double newHourlyPay,
int newNumDeps, int newType);
};
Employee::Employee( int initId, string initName,
double initHourlyPay,
int initNumDeps, int initType )
{
bool status = set( initId, initName, initHourlyPay,
initNumDeps, initType );
if ( !status )
{
id = 0;
name = "";
hourlyPay = 0.0;
numDeps = 0;
type = 0;
}
}
bool Employee::set( int newId, string newName, double newHourlyPay,
int newNumDeps, int newType )
{
bool status = false;
if ( newId > 0 && newHourlyPay > 0 && newNumDeps >= 0 &&
newType >= 0 && newType <= 1 )
{
status = true;
id = newId;
name = newName;
hourlyPay = newHourlyPay;
numDeps = newNumDeps;
type = newType;
}
return status;
}
Note that the constructor and set functions do validation on the data that is to be stored in the Employee object. They are similar to the validation in the Rectangle class from the textbook in
Section 7.11 Focus on Software Engineering: Separating class Specification, Implementation and Client Code.
For a more detailed discussion of validation for class objects, and the Employee class validation, see
Employee Data Validation
.
You should be able to copy this class into your editor by highlighting the code, making a copy of it (ctrl-c in Windows), and then pasting the code into your editor window.
Do not make any changes to the data members of the class. Do not add any new data members to the class. Do not make any changes to t ...
Open a new project in Visual Studio Community and name it in the form.pdflonkarhrishikesh
Open a new project in Visual Studio Community and name it in the form of Last
name_CourseSection_Assignment 3. You are expected to use Loops and IO filestreams in this
program. Write comments to explain what each statement does, and how it achieves the desired
results (Remember to review the rubric posted under Course Materials to understand how your
program will be graded) PART 1: Write a program in C + that permits users to enter the
following information about your company's five employees and writes the following
information to the file (data.txt). Employee ID. Name Years with company Hourly Wages All
information must be displayed in a well formatted manner, so you can put in relevant
manipulators for this purpose. Run your program, put in employee information (for 5
employees), and verify if you have a txt file as required. PART 2: At this point you must have a .
tat file with information of 5 employees. Go back to your C + + programt (from part 1). put the
entire existing program from part I within block comstents / .... % , Now write a new program for
part 2 (in that same C + + file) as per instractions given below: Write a C + + program that reads
this file data. txt , one line at a time, asks for the number of hours worked by each employee per
month and calculates their total pay for that month. So for each of the employee records that
stream in, your program must ask user: Enter hours worked by (mame of employee): When user
puts in the answer, program must calculate the total salary and display on the computer screen as
* The salary of (name) is S (salary). EXIRA CREDIT ( 10 points) Make provisions in your part
2 program for the salary information (along with some other employee details) to be stored in a
new file called (February_salary.txt). Your information must be saved to the file in the following
format. ID no. Name Hourly wages Salary.
Access tips access and sql part 6 dynamic reportsquest2900
This document summarizes part 6 of a tutorial on creating dynamic reports in Microsoft Access. It describes how to build a dialog box that allows users to filter and sort the data displayed in an Access report. The dialog box uses combo boxes and list boxes to let users select filter criteria for fields like office and department. The code constructs SQL statements to dynamically update the report's filter property based on the user's selections. It also explains how to add sorting options so users can choose up to three fields to sort the report data.
The document provides definitions for various computer science and programming terms related to C++ including data types, operators, statements, functions, classes, inheritance, and more. It defines terms such as #include, abstract class, aggregate, alias, allocation, argument, array, assignment, base class, bit, bool, break, byte, call by reference, call by value, case, char, cin, class, class layout, class member, class template, comments, compiler, const, constructor, continue, copy constructor, cout, data structure, debugger, declaration, default argument, definition, delete operator, derived class, destructor, do, double, dynamic memory allocation, else, endl, explicit, expression, expression statement
I am Irene M. I am a C++ Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from from California, USA. I have been helping students with their homework for the past 10 years. I solve homework related to C++.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with C++ Homework.
This presentation is a part of the COP2272C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce students to the C++ language and the fundamentals of object orientated programming..
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
Here is the class Book with the requested attributes and member functions:
#include <iostream>
using namespace std;
class Book {
private:
string title;
string author;
string publisher;
float price;
public:
Book() {
title = "No title";
author = "No author";
publisher = "No publisher";
price = 0.0;
}
void display_data() {
cout << "Title: " << title << endl;
cout << "Author: " << author << endl;
cout << "Publisher: " << publisher << endl;
cout << "Price: " << price << endl;
}
The document provides information about C programming language and its features. It discusses the basic structure of a C program which includes documentation, link, definition, global declaration, main function, and sub-program sections. It also describes the four steps to execute a C program: create, compile, link, and execute. Different forms of the main statement in C are discussed including main(), main(void), int main(), void main(), void main(void), and int main(void).
Solutions manual for c++ programming from problem analysis to program design ...Warren0989
Solutions Manual for C++ Programming From Problem Analysis to Program Design 8th Edition by Malik IBSN 9781337102087
Download at: https://goo.gl/nxo13w
People also search:
c++ programming from problem analysis to program design 7th edition pdf
c++ programming malik 8th edition pdf
c++ programming from problem analysis to program design 8th edition pdf download
c++ programming from problem analysis to program design exercise answers
c++ programming from problem analysis to program design solution manual
c++ programming program design including data structures 7th edition pdf download
c++ programming from problem analysis to program design 6th edition pdf
c++ programming from problem analysis to program design 7th edition solution manual
.NET is designed to solve problems that have plagued programmers in the past like incompatibilities between programming languages and technologies. It provides a common language runtime and type system that allows different languages to work together. The .NET Framework handles many common programming tasks like serialization automatically through metadata and provides a large class library for common functions.
I am Thanasis F. I am an Online C++ Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from Harvard University. I have been helping students with their homework for the past 6 years. I solve homework related to Online C++.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with Online C++ Homework.
Similar to I am having trouble writing the individual files for part 1, which i.pdf (20)
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdfmallik3000
Explain how The Capitol Building (in D.C.) is a reflection of Greco-Roman architecture.
Solution
Capitol Building is a fine example of the 19th-century neoclassical architecture, the Capitol
Building’s interior is dominated by Greco- Roman designs, and contains a profusion of frescoes,
murals. It has five floors, of which the first level contains committee rooms and spaces allocated
to various congressional officers. It also Consists of cast-iron dome, topped with Thomas
Crawford\'s colossal statue. The dome is famed for its odd acoustic sounds. The white colour is
also significance of romans..
Exercise 14-3
GURLEY CORPORATION
Comparative Condensed Balance Sheets
December 31
2017
2016
2017
2016
Increase
(Decrease)
Percentage
Change from 2016
Assets
Current assets
$ 73,500
$ 78,200
Property, plant & equipment (net)
97,100
88,200
Intangibles
Total assets
Liabilities and stockholders\' Equity
Current liabilities
$ 41,000
$ 48,400
Long-term liabilities
140,000
150,000
Stockholders\' equity
Total liabilities and stockholders\' equity
Amount
Percent
Assets
Current assets
$ 73,500
Property, plant, and equipment (net)
97,100
Intangibles
Total assets
Liabilities and stockholders\' equity
Current liabilities
$ 41,000
Long-term liabilities
140,000
Stockholders\' equity
Total liabilities and stockholders\' equity
Exercise 14-3 The comparative condensed balance sheets of Gurley Corporation are presented
below.
GURLEY CORPORATION
Comparative Condensed Balance Sheets
December 31
2017
2016Assets Current assets$ 73,500$ 78,200 Property, plant, and equipment
(net)97,10088,200 Intangibles27,00042,000 Total assets$ 197,600$ 208,400Liabilities and
stockholders’ equity Current liabilities$ 41,000$ 48,400 Long-term
liabilities140,000150,000 Stockholders’ equity16,60010,000 Total liabilities and
stockholders’ equity$ 197,600$ 208,400
(a)
Prepare a horizontal analysis of the balance sheet data for Gurley Corporation using 2016 as a
base. (Enter negative amounts and percentages using either a negative sign preceding the
number e.g. -45, -45% or parentheses e.g. (45), (45%).Round percentages to 1 decimal place,
e.g. 12.3%.)
GURLEY CORPORATION
Condensed Balance Sheets
For the Year Ended December 31 For the Quarter Ended December
31 December 31
2017
2016
Increase
(Decrease)
Percentage
Change from 2016
Assets
Current assets
$ 73,500
$ 78,200$
%
Property, plant & equipment (net)
97,100
88,200
%
Intangibles27,00042,000
%
Total assets$ 197,600$ 208,400$
%
Liabilities and stockholders\' Equity
Current liabilities
$ 41,000
$ 48,400$
%
Long-term liabilities
140,000
150,000
%
Stockholders\' equity16,60010,000
%
Total liabilities and stockholders\' equity$ 197,600$ 208,400$
%
(b)
Prepare a vertical analysis of the balance sheet data for Gurley Corporation in columnar form
for 2017. (Round percentages to 1 decimal place, e.g. 12.3%.)
GURLEY CORPORATION
Condensed Balance Sheet
For the Quarter Ended December 31, 2017 December 31, 2017
For the Year Ended December 31, 2017
Amount
Percent
Assets
Current assets
$ 73,500
%
Property, plant, and equipment (net)
97,100
%
Intangibles27,000
%
Total assets$ 197,600
%
Liabilities and stockholders\' equity
Current liabilities
$ 41,000
%
Long-term liabilities
140,000
%
Stockholders\' equity16,600
%
Total liabilities and stockholders\' equity$ 197,600
%
Solution
GURLEY CORPORATION Condensed Balance Sheets December 31 2017 2016
Increase (Decrease) % change Assets: Current assets 73500 78200 -4700 -6.0% Property,
plant & equipment (net) 97100 88200 8900 10.1% Intangibles 27000 42000 -15000 -35.7%
Total assets 197600 208400 -10800 -5.2% Lia.
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdfmallik3000
estion 5 of 34 Sapling Learning Which is the correct name of the following molecule? O 3,6-
diethyl-5-isobutyl-8-rnethylinonane O 4.7-diethyl-5-isobutyl 2 methyinonane 3,6-diethyl-5-
isopropyl-8-methylinonane 2.3-dimethyl-5-butyl-8-methylnonane
Solution
Basic IUPAC rules for alkanes
Step 1 The longest continuous chain of carbon atoms is the parent chain. If there is no longest
chain because two or more chains are the same longest length, then the parent chain is defined as
the one with the most branches. (The idea here is to keep the name simpler. More branches
numbered from the parent chain means fewer parentheses needed later.)
Carbon atoms connected to the parent chain but not part of it are parts of branches. To avoid
ambiguity, branches are numbered based on the carbon number of the parent chain at the point of
attachment to the parent chain.
Step 2 The general idea in naming organic compounds is to always aim for the smallest numbers
possible. Whenever two or more possibilities exist, which is usually the case, because there are
two ends you can start numbering from on all acyclic chains, \"smallest numbers\" means
smallest at the first difference.
Step 3 Once all the numbers for the branches are determined, the branches are named using -yl,
and ordered alphabetically. If branches themselves are branched, then the complete name of the
branch (with numbers) must be determined at this time. It is the complete name of the branch
which is alphabetized.
Step 4 Finally, when more than one of the same branch is present, the prefixes di, tri, tetra, etc.
for simple branches and bis, tris, tetrakis, etc. for branches containing numbers, are added just
after the numbers locating the branch on the parent chain. The name is constructed by separating
numbers with commas and adding hyphens before and after sets of numbers so that they don\'t
run into words. Branches with numbers are set off with parentheses so that it is clear that the
numbers only refer to that branch. Other than that, there is no punctuation and there are no
spaces in the names.
Hence option (b) is correct
4,7 di methyl 5 isobutyl 2 methyl nonane.
Discuss the difference between the two levels of moral development. .pdfmallik3000
Discuss the difference between the two levels of moral development. Provide an example to
illustrate the points you are making
Solution
Piaget\'s Theory of Moral Development
Piaget (1932) was principally interested not in what children do (i.e. in whether they break rules
or not) but in what they think. In other words he was interested in children’s moral reasoning.
Piaget was interested in three main aspects of children’s understanding of moral issues. They
were
Where do rules come from?
Can rules be changed?
Who makes rules?
Who is to blame for “bad\" things?
Is it the outcome of behaviour that makes an action “bad\"?
Is there a difference between accidental and deliberate wrongdoing
Children’s understanding of rules. This leads to questions like
Children’s understanding of moral responsibility. This leads to questions likeShould the
punishment fit the crime?Are the guilty always punished
Children’s understanding of justice. This leads to questions like
Piaget found that children’s ideas regarding rules, moral judgements and punishment tended to
change as they got older. In other words just as there were stages to children’s cognitive
development so also there were universal stages to their moral development. Piaget (1932)
suggested two main types of moral thinking:
Heteronomous morality (moral realism)
Autonomous morality (moral relativism)
Heteronomous Morality (5-9yrs)
The stage of heteronomous morality is also known asmoral realism– morality imposed from the
outside. Children regard morality as obeying other people\'s rules and laws, which cannot be
changed. They accept that all rules are made by some authority figure (e.g. parents, teacher,
God), and that breaking the rules will lead to immediate and severe punishment (immanent
justice). The function of any punishment is to make the guilty suffer in that the severity of the
punishment should be related to severity of wrong-doing (expiatory punishment).
During this stage children consider rules as being absolute and unchanging, i.e. \'divine like\'.
They think that rules cannot be changed and have always been the same as they are now.
Behaviour is judged as “bad\" in terms of the observable consequences, regardless on the
intentions or reasons for that behaviour. Therefore, a large amount of accidental damage is
viewed as worse than a small amount of deliberate damage.
Research Findings
Piaget (1932) told the children stories that embodied a moral theme and then asked for their
opinion. Here are two examples:
There was once a little girl who was called Marie. She wanted to give her mother a nice surprise
and cut out a piece of sewing for her. But she didn’t know how to use the scissors properly and
cut a big hole in her dress.
and
A little girl called Margaret went and took her mother’s scissors one day when her mother was
out. She played with them for a bit. Then, as she didn’t know how to use them properly, she
made a little hole in her dress.
The child is then asked, “Who is naughtie.
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdfmallik3000
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons (Ha & Hb) exhibit
different chemical shifts? Hb Ha Hd 2) Why do Diels-Alder reactinns hninoll
Solution
Methylene protons adjacent to a chiral center will be non equivalent, despite the fact that there is
free rotation about the cabon-carbon bond. Such protons are described as diastereotopic, since
replacement of either of the two hydrogen in turn by a group X produces a pair of diastereomers..
Compare Plato and Aristotles philosophies of mathematics and relat.pdfmallik3000
Compare Plato and Aristotle\'s philosophies of mathematics and relate their views to their
understanding of form. Locate a weakness of each view.
Solution
Plato and Aristotle are both great philosophers in their own regard. Both agree that the world has
a purpose, and that it’s not just an accident. Even though Aristotle was a student of Plato, each
philosopher develops his own view on things and a specific way of solving a particular problem.
For example, Plato and Aristotle have quite different views regarding life.
Plato thinks that we are able to obtain the same kind of certainty in rules of behavior as with
mathematics. According to him the ultimate vision of the Form of the Good will provide a single
standard for deciding practical questions. Unfortunately only the few individuals who can make
the hard journey through the Cave will be able to give a solution for all questions of value.
Aristotle does not have the same view – according to him, we should not ask for more certainty
than the subject matter allows. A normal person is able to make good decisions and to live a
good life; one need not be an expert in ethical knowledge to practice it.
Although the two philosophers are quite similar in the problems they deal with, they go about
doing it in a very separate and distinguished manner. Most of Plato’s philosophy is centered on
the Forms, which is his solution for pretty much everything. Aristotle, on the other hand, does
not have one unifying solution. He prefers to tackle each problem separately, work it out as best
as he can, and give an answer. And yet both of them deserve utmost credit for at least one thing:
making people think. That is very important, especially in today’s society where people prefer to
reason things out with guns and fighting instead of thinking of a solution.
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdfmallik3000
Choose one of the evolutions of Critical Incident Technique (CIT) and discuss how it may have
made the application of CIT to specific leadership consultations more useful.
Solution
The Critical Incident Technique (or CIT) is a set of procedures used for collecting direct
observations of human behavior that have critical significance and meet scientifically defined
criteria. These observations are then kept track of as incidents, which are then used to solve
practical problems and develop broad emotional principles. A critical incident can be described
as one that makes a contribution either positively or negatively to an activity. Critical incidents
can be gather in various ways, however characteristically respondents are asked to tell a story
about an information they have had.
It\'s a flexible procedure that usually relies on five key areas. The first is determining and
reviewing the incident, then fact-finding, which involves collecting the details of the incident
from the participants. When all of the facts are collected, the next step is to recognize the issues.
Afterwards a conclusion can be made on how to resolve the issues based on various achievable
solutions. The final and most important feature is the evaluation, which will conclude if the
solution that was selected will solve the root cause of the situation and will cause no further
problems..
Change the creature in this java program to a different one .pdfmallik3000
Change the creature in this java program to a different one:
// Creature.java Author: Lewis/Loftus
//
//
Solution
to Programming Project 9.12
//********************************************************************
import javax.swing.*;
import java.awt.*;
import java.util.Random;
public class Creature
{
private int creatureX, creatureY, clickCount, catchCount;
private ImageIcon creature;
private Random gen;
//-----------------------------------------------------------------
// Creates the creature.
//-----------------------------------------------------------------
public Creature(int initialX, int initialY)
{
creature = new ImageIcon(\"happyFace.gif\");
creatureX = initialX;
creatureY = initialY;
clickCount = catchCount = 0;
gen = new Random();
}
//-----------------------------------------------------------------
// Moves the creature to a random location within the play area.
//-----------------------------------------------------------------
public void move(Dimension area)
{
creatureX = gen.nextInt(area.width - creature.getIconWidth());
creatureY = gen.nextInt(area.height - creature.getIconHeight());
}
//-----------------------------------------------------------------
// Returns true if point (x , y) is in the creature and increments
// the catch count, else returns false.
//-----------------------------------------------------------------
public boolean pointInMe(int x, int y)
{
clickCount++;
if (x >= creatureX && x <= creatureX + creature.getIconWidth())
{
if (y >= creatureY && y <= creatureY + creature.getIconHeight())
{
catchCount++;
return true;
}
else
return false;
}
else
return false;
}
//-----------------------------------------------------------------
// Returns the number of catches.
//-----------------------------------------------------------------
public int getCatchCount()
{
return catchCount;
}
//-----------------------------------------------------------------
// Returns the number of misses.
//-----------------------------------------------------------------
public int getMissCount()
{
return clickCount - catchCount;
}
//-----------------------------------------------------------------
// Draws the creature on the specified component.
//-----------------------------------------------------------------
public void draw(Component panel, Graphics page)
{
creature.paintIcon(panel, page, creatureX, creatureY);
}
}
TheCreaturePanel.java Author: Lewis/Loftus
//
//.
Canon Corporation had the following static budget at the beginning o.pdfmallik3000
Canon Corporation had the following static budget at the beginning of the company\'s accounting
period:
If actual production totals 9,900 units, the flexible budget would show total costs of:
A. $4,950.
B. $9,700.
C. $4,850.
D. None of these is correct.Revenue (9,500 units)$19,000Variable costs4,750Contribution
margin$14,250Fixed costs4,750Net income$9,500
Solution
Aanswer is B. $ 9700 Explanation: Total Cost for 9900 units under Flexible Budget:
variable cost (4750/9500 *9900) 4950 Fixed cost 4750 Total cost for 9900 units 9700.
Can someone please prove this equation is an identity. Cos^2.pdfmallik3000
Can someone please prove this equation is an identity.
Cos^2 X - sin^2 X = 2cos^2 x - 1
Can someone give me some tips for proving indentity, aside knowing the basic identities,pytho
indetites
For example when to factor, . And when to multitiply an identity 1-cost/1-cost to prove an
identity.
And also when will I know if I have to simplify the other side to prove an identity
Thank you
Can someone please prove this equation is an identity.
Cos^2 X - sin^2 X = 2cos^2 x - 1
Can someone give me some tips for proving indentity, aside knowing the basic identities,pytho
indetites
For example when to factor, . And when to multitiply an identity 1-cost/1-cost to prove an
identity.
And also when will I know if I have to simplify the other side to prove an identity
Thank you
Cos^2 X - sin^2 X = 2cos^2 x - 1
Can someone give me some tips for proving indentity, aside knowing the basic identities,pytho
indetites
For example when to factor, . And when to multitiply an identity 1-cost/1-cost to prove an
identity.
And also when will I know if I have to simplify the other side to prove an identity
Thank you
Solution
cos2x - sin2x= 2 cos2x-1
RHS:
2 cos2x-1
[ from sin2x + cos2x=1]
=2 cos2x- ( sin2x + cos2x)
= 2 cos2x- sin2x - cos2x
= cos2x - sin2x
= LHS
hence proved.
Write a program that finds the max binary tree height. (This is an ex.pdfmallik3000
This program finds the maximum height of a binary tree by recursively calculating the height of the left and right subtrees and returning the taller of the two heights plus one. It creates a binary tree with sample nodes, calls the height function on the root node, and prints out the resulting tallest height of the tree, which is 3.
What happens when the JVM encounters a wait () callSolution=.pdfmallik3000
What happens when the JVM encounters a wait () call?
Solution
=>when jvm encounters wait method then it causes the current thread to wait until any other
threads calls notify method
=>so the present/current thread must own this monitoring of objects.so the thread will leave the
ownership(it means
jvm will take the current threads owner ship and give to otherthread ) and when the another
process is completed (or)
wait until another thread wakehim up using notify method,then the jvm will give ownership to
the current thread.
Write a program in c++ that maintains a telephone directory. The Tel.pdfmallik3000
Write a program in c++ that maintains a telephone directory. The Telephone directory keeps
records of people’s names and the corresponding phone numbers.
The program should read a transaction file and report the result into an output file. The
transaction file can include commands such as “Add”, “Delete”, “Display”, and “Update”, and
“Search”. Each command is written in one line with a few other information.
The “Display” Command should simply display everyone in the directory on the screen
The “Add” command comes with 3 other information that includes “First Name”, “Last Name”,
and “Phone Number”. You should only add this command if the phone number is unique and it is
not assigned to any other person. Otherwise an error statement should be generated to indicate
that “Duplicate phone number is not allowed”. If the addition of the record is successful, you
need to report that in the output file as follows:
“First Name”, “Last Name”, “Phone Number” has been successfully added to the directory
If the addition fails, you should report that
“**** ERROR IN ADD **** “Phone Number” already exist in the directory
The “Delete” command comes with the “Phone Number” indicating that this record should be
deleted from the directory. You should only delete the record if you can find the phone number.
If you could remove the record from the directory, you should report:
“First Name”, “Last Name”, “Phone Number” has been successfully deleted from the directory
If the delete fails, you should report that
“**** ERROR IN DELETE **** “Phone Number” does exist in the directory
The “Update” command come with two values, “Phone Number” and “New Phone Number”.
You program should first search for “Phone Number” and find out if such a phone number exist
in the directory. If it does not find it, it should report:
“**** ERROR IN UPDATE **** The Phone Number does not exist in the directory
However, if it finds the phone number, there are two cases. If the “New Phone Number” already
exists in the directory, it should report
“**** ERROR IN UPDATE **** The New Phone Number “New Phone Number” already exist
in the directory.
If the “New Phone Number” does not exist in the directory, your program should replace the
“Old Phone Number” with the “New Phone Number” and report
The Phone Number “Old Phone Number” is successfully updated to “New Phone Number”
There are two types of “Search” commands. One is done based on the last name and another is
done based on the phone number. If it is done based on the last name, the search command can
be as follows:
Search BasedOnLastName “LastName”
In this case the search is done based on the last name. Your program should search for all records
with that last name and report them on the screen. If the search fails your report should have the
following format
“**** ERROR IN SEARCH **** No Record with the last name “Last Name” could be found”
If the search is done based on the phone number, the command should be
Search BasedOnPhoneNumber “Phone.
Using the C++ programming language1. Implement the UnsortedList cl.pdfmallik3000
Using the C++ programming language
1. Implement the UnsortedList class to store a list of numbers that are input into the list from
data.txt.
- create a main.cpp file that gets the numbers from the file
- insert the number 7 into the list
- insert another number 300 into the list
- delete the number 6 from the list
- print out the following:
--the entire list
- the greatest
- the least
2. Attach the main.cpp, UnsortedList.cpp, the ItemType.h, and the output file two called
outfile2.txt
Use the files below:
// listDriver.cpp
// Test driver
#include
#include
#include
#include
#include
#include \"unsorted.h\"
using namespace std;
void PrintList(ofstream& outFile, UnsortedType& list);
int main()
{
ifstream inFile; // file containing operations
ofstream outFile; // file containing output
string inFileName; // input file external name
string outFileName; // output file external name
string outputLabel;
string command; // operation to be executed
int number;
ItemType item;
UnsortedType list;
bool found;
int numCommands;
// Prompt for file names, read file names, and prepare files
cout << \"Enter name of input command file; press return.\" << endl;
cin >> inFileName;
inFile.open(inFileName.c_str());
cout << \"Enter name of output file; press return.\" << endl;
cin >> outFileName;
outFile.open(outFileName.c_str());
cout << \"Enter name of test run; press return.\" << endl;
cin >> outputLabel;
outFile << outputLabel << endl;
if (!inFile)
{
cout << \"file not found\" << endl;
exit(2)
}
inFile >> command;
numCommands = 0;
while (command != \"Quit\")
{
if (command == \"PutItem\")
{
inFile >> number;
item.Initialize(number);
list.PutItem(item);
item.Print(outFile);
outFile << \" is in list\" << endl;
}
else if (command == \"DeleteItem\")
{
inFile >> number;
item.Initialize(number);
list.DeleteItem(item);
item.Print(outFile);
outFile << \" is deleted\" << endl;
}
else if (command == \"GetItem\")
{
inFile >> number;
item.Initialize(number);
item = list.GetItem(item, found);
item.Print(outFile);
if (found)
outFile << \" found in list.\" << endl;
else outFile << \" not in list.\" << endl;
}
else if (command == \"GetLength\")
outFile << \"Length is \" << list.GetLength() << endl;
else if (command == \"IsFull\")
if (list.IsFull())
outFile << \"List is full.\" << endl;
else outFile << \"List is not full.\" << endl;
else if (command == \"MakeEmpty\")
list.MakeEmpty();
else if (command == \"PrintList\")
PrintList(outFile, list);
else
cout << command << \" is not a valid command.\" << endl;
numCommands++;
cout << \" Command number \" << numCommands << \" completed.\"
<< endl;
inFile >> command;
};
cout << \"Testing completed.\" << endl;
inFile.close();
outFile.close();
return 0;
}
void PrintList(ofstream& dataFile, UnsortedType& list)
// Pre: list has been initialized.
// dataFile is open for writing.
// Post: Each component in list has been written to dataFile.
// dataFile is still open.
{
int length;
ItemType item;
list.ResetList();
length = list.GetLength();
for .
Why are supplies and inventory not considered plant assetsSolut.pdfmallik3000
Why are supplies and inventory not considered plant assets?
Solution
Plant assets is that assets which is used more than one year and used in producing operating
revenues. But supplies and inventory is not assets which is used for producing revenue. but it is
as current assets because generally it used in less than one year.
What is the major purpose of the Federal Reserve System What is the.pdfmallik3000
What is the major purpose of the Federal Reserve System? What is the responsibility of the
Board of Governors and the Federal Open Market Committee? Should the Fed be independent as
it is now or should it be a federal gency subject ot the direction by Congress or the President?
Why or why not?
Solution
The most critical and visible function of Federal Reserve is to carry out monetary policy. It is
solely done to deal with inflation as well as preserve stable prices. To obtain the above
mentioned things the Fed sets a 2.0 percent inflation target for the core inflation rate. Maximum
employment is also pursued by it. The main aim is the natural rate of unemployment of 4.7-5.8
percent. The Fed also moderates long-term interest rates by the way of open market operations
along with the fed funds rate. The objective of monetary policy is healthy economic growth.
Next, the Fed supervises and regulates several of the nation’s banks to guard consumers. It also
maintains the permanence of the financial markets while constrains potential crises. It provides
banking services to other banks, the U.S. government along with foreign banks. It is America\'s
central bank which makes it the most authoritative solitary actor in the U.S. economy along with
the world.
The Federal Reserve System has three components, the Board of Governors directs monetary
policy while its seven members are in charge for setting the discount rate as well as the reserve
requirement for member banks. Staff economists make available all analyses.
The Federal Open Market Committee oversees open market operations which includes setting
the target for the fed funds rate, thus guides interest rates. The board members along with four of
the twelve bank presidents are members meet eight times a year.
The Federal Reserve Banks administer commercial banks in addition execute policy. They
supervise commercial banks along with the board .
It Manages Inflation by administration of credit which is the largest constituent of the money
supply. The Federal Reserve sets for the nation\'s banks the reserve requirement. It oversees
approximately 5,000 bank holding companies, 850 state bank members of the Federal Reserve
Banking System plus any foreign banks operating in the United States.
The Federal Reserve worked intimately with the Treasury Department to thwart global financial
collapse throughout the financial crisis of 2008. The Fed buys U.S. Treasurys from the federal
government, which we call monetizing the debt. That\'s for the reason that the Fed creates the
money it uses to buy the Treasurys, while adding that much money to the money supply.
The FOMC holds eight frequently planned meetings per year. Economic and financial conditions
are revived. The appropriate position of monetary policy is also determined by it, along with the
assessment of the risks to its long-run goals of price stability and sustainable economic growth.
The Federal Open Market Committee is comprised of twelve members--th.
What is the role of culture in leader development What culture fact.pdfmallik3000
What is the role of culture in leader development? What culture factors must be taken into
account when implementing a program?
Solution
Answer:-
The role of culture in leader development:-
The major role played by culture in leader development is that culture sets the direction and
therefore the overall success in any organization. Culture outlays the beliefs,assumptions as well
as the procedures that lead to leader development.The culture must also align with the team goals
and ambitions.
Culture factors must be taken into account when implementing a program are:-
Diversity effects:-In a case where the program is being implement by a team that are of different
ethnicity and racial backgrounds,it is important to evaluate the diversity effects.
The social:-Economic setting of the environment in which the program is being implemented.
The top leadership principles and their alignment with the culture.
The nature of the business implementing the program..
What methods can IT use to make sure its initiatives have the suppor.pdfmallik3000
What methods can IT use to make sure its initiatives have the support of business leadership?
Solution
IT initiatives often require a lot of investments in terms of money, time and effort. Such huge
demand for resources puts constraints on the organisation and a strong leadership support is
necessary for a successful project. But not every time can we expect leaders offer the support an
IT initiative requires. The following actions are helpful in such cases
1. Understand and listen to leaders
2. Create a vision
Identify where the organization would be if IT initiatives are in place and share them. Show the
management, the outcome of the initiatives.
3. Speak the language of management
4. Create a sense of urgency
May a time organizational leaders get trapped in a state of complacency. It is necessary to show
them the need for immediate action and progress. Show them the external and internal factors
affecting the organization and how other organizations are responding to these changing
dynamics and trends. Show them how other organizations and industries are faring well and
create a sense of urgency.
Show them the costs of not taking such initiatives- the cost in terms of time, money and customer
satisfaction
5. Involve them in the process
6. Update them regularly with key performance indicators (sales, profit margin, customer
satisfaction score etc).
What is IT infrastructure, and what are the stages and drivers of IT.pdfmallik3000
What is IT infrastructure, and what are the stages and drivers of IT infrastructure evolution?
Define IT infrastructure from both a technology and a services perspective. I need an answer to
these questions that is different from the one on site from an expert.
Solution
IT infrastructure: Consists of set of physical devices with softwares required for the operation of
the entire enterprise. IT infrastructure provides a foundation for the following
1)Serving customers
2) Working with vendors
3)Managing business processes
IT infrastructure components
Usual services provided by IT Infrastrucure : Security services, Data center migration, Remote
infrastructure management, Cloud services, Virtualization services ,Network services etc.
Stages and drivers of IT infrastructure evolution
1)Generalpurpose mainframe & minicomputer era:1959 to present
In 1958 IBM first mainframes were introduced
In 1965 DEC minicomputers were introduced
2)Personal computer era: 1981 to present
In 1981 IBM PC were introduced
Heavy usage of standalone desktop computers with office productivity softwares.
3)Client/server era :1983 to present
Consists of desktop or laptop clients networked to more powerful servers like network or
application or Web. The network between clients and servers may be two tiered or N-tiered
Two tiered network: Here direct communication takes place between client and server and no
intermediate between client and server.The advantage is understanding and easy maintenance.
N-tiered network : The whole work of the entire network is distributed over several different
levels of servers to reduce the overall cost.
4)Enterprise Internet era: 1992-present
The TCP/IP suite enables firms to link devices and local area networks to form a single
enterprise-wide network.
5)Cloud Computing: 2000 to present
This is a fast growing computing and here firms and individuals obtain computing softwares
over the Internet or through other networks.
IT Infrastructure in terms of technology perspective : In technology perspective IT infrastructure
is defined as the shared technology resources for the organisation’s specific information system
applications. This includes a set of physical devices and softwares that are required for operation
of the entire enterprise.
Service perspective of an IT Infrastructure:In Service perspective IT infrastructure is defined as
platform that provides the platform for serving customers, working with vendors, and managing
internal firm business processes.In service perspective IT infrastructure focuses on the services
provided by hardware and software..
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPRAHUL
This Dissertation explores the particular circumstances of Mirzapur, a region located in the
core of India. Mirzapur, with its varied terrains and abundant biodiversity, offers an optimal
environment for investigating the changes in vegetation cover dynamics. Our study utilizes
advanced technologies such as GIS (Geographic Information Systems) and Remote sensing to
analyze the transformations that have taken place over the course of a decade.
The complex relationship between human activities and the environment has been the focus
of extensive research and worry. As the global community grapples with swift urbanization,
population expansion, and economic progress, the effects on natural ecosystems are becoming
more evident. A crucial element of this impact is the alteration of vegetation cover, which plays a
significant role in maintaining the ecological equilibrium of our planet.Land serves as the foundation for all human activities and provides the necessary materials for
these activities. As the most crucial natural resource, its utilization by humans results in different
'Land uses,' which are determined by both human activities and the physical characteristics of the
land.
The utilization of land is impacted by human needs and environmental factors. In countries
like India, rapid population growth and the emphasis on extensive resource exploitation can lead
to significant land degradation, adversely affecting the region's land cover.
Therefore, human intervention has significantly influenced land use patterns over many
centuries, evolving its structure over time and space. In the present era, these changes have
accelerated due to factors such as agriculture and urbanization. Information regarding land use and
cover is essential for various planning and management tasks related to the Earth's surface,
providing crucial environmental data for scientific, resource management, policy purposes, and
diverse human activities.
Accurate understanding of land use and cover is imperative for the development planning
of any area. Consequently, a wide range of professionals, including earth system scientists, land
and water managers, and urban planners, are interested in obtaining data on land use and cover
changes, conversion trends, and other related patterns. The spatial dimensions of land use and
cover support policymakers and scientists in making well-informed decisions, as alterations in
these patterns indicate shifts in economic and social conditions. Monitoring such changes with the
help of Advanced technologies like Remote Sensing and Geographic Information Systems is
crucial for coordinated efforts across different administrative levels. Advanced technologies like
Remote Sensing and Geographic Information Systems
9
Changes in vegetation cover refer to variations in the distribution, composition, and overall
structure of plant communities across different temporal and spatial scales. These changes can
occur natural.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
Gender and Mental Health - Counselling and Family Therapy Applications and In...PsychoTech Services
A proprietary approach developed by bringing together the best of learning theories from Psychology, design principles from the world of visualization, and pedagogical methods from over a decade of training experience, that enables you to: Learn better, faster!
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
Pengantar Penggunaan Flutter - Dart programming language1.pptx
I am having trouble writing the individual files for part 1, which i.pdf
1. I am having trouble writing the individual files for part 1, which is as follows:
part 1
Purpose
This assignment reviews object-oriented programming concepts such as classes, methods,
constructors, accessor methods, and access modifiers. It makes use of an array of objects as a
class data member, and introduces the concept of object serialization or "binary I/O".
Set Up
(Yes, these commands are rather tedious to type repeatedly. Part 2 of this assignment introduces
a new technique for compiling and linking your program files called a makefile. Makefiles
require a bit more work up front, but save a lot of typing at the command line once the makefile
has been created.)
As in Assignment 1, you should create a subdirectory to hold your files for Assignment 2.
In that directory, make a symbolic link to the data file for this part of the assignment:
In this assignment, you will be creating several source code and header files, as described below.
You can create each of these files separately using the nano editor, just as you did on Assignment
1.
To compile and link the program you've created, type:
Once you've added the AccountDB class, you should type:
To run the executable file created by the previous command, type:
Program
For this assignment, you will need to write three source code files as well as two header files.
Each of these files is relatively short, but many inexperienced programmers are overwhelmed by
the idea of writing a program as multiple files. "Where do I start?!!" is a common refrain. This
assignment sheet attempts to walk you through the steps of writing a multi-file program.
The steps outlined below should not be thought of as a purely linear process, but rather an
iterative one - For example, work a little on Step 1, then a little on Step 2, then test what you've
written (Step 3).
Step 1: Write the CreditAccount class declaration
The CreditAccount class represents information about a credit card account. The code for the
CreditAccount class will be placed in two separate files, which is the norm for non-template C++
classes.
The header file for a class contains the class declaration, including declarations of any data
members and prototypes for the methods of the class. The name of the header file should be of
the form ClassName.h (for example, CreditAccount.h for the header file of theCreditAccount
2. class).
A skeleton for the CreditAccount.h file is given below. As shown, a header file should begin and
end with header guards to prevent it from accidentally being #included more than once in the
same source code file (which would produce duplicate symbol definition errors). The symbol
name used in the header guards can be any valid C++ name that is not already in use in your
program or the C/C++ libraries. Using a name of the format CLASSNAME_H (like
CREDIT_ACCOUNT_H in the code below) is recommended to avoid naming conflicts.
Data Members
The CreditAccount class should have the following private data members:
an account number (a char array with room for 19 characters PLUS the null character, i.e. 20
elements total)
a customer name (a char array with room for 20 characters PLUS the null character)
a credit limit (a double variable)
a current account balance (a double variable)
Note: Make that sure you code your data members in THE EXACT ORDER LISTED ABOVE
and with THE EXACT SAME DATA TYPES. If you use float instead of double or only make
the name array 20 characters long instead of 21, your final program will not work correctly!
C++11 Initialization Option for Data Members
C++11 adds the ability to initialize the non-static data members of a class at the time you declare
them using a "brace-or-equal" syntax. This is very convenient, and can eliminate most or all of
the code from your default constructor. Here are a few examples of the kind of initializations you
can do in a class declaration:
Feel free to use this option if you want to.
Method Prototypes
The CreditAccount class declaration should (eventually) contain public prototypes for all of the
methods in the CreditAccount.cpp source code file described in Step 2 below.
Step 2: Write the CreditAccount class implementation
The source code file for a class contains the method definitions for the class. The name of the
source code file should be of the form ClassName.cpp or ClassName.cc (for example,
CreditAccount.cpp for the source code file of the CreditAccount class).
The CreditAccount class implementation should (eventually) contain definitions for all of the
methods described below. Make sure to #include "CreditAccount.h" at the top of this file.
CreditAccount default constructor - This "default" constructor for the CreditAccount class takes
no parameters. Like all C++ constructors, it does not have a return data type.
This method should set the account number and customer name data members to "null strings".
This can be done by copying a null string literal ("") into the character array using strcpy() or
3. by setting the first element of the array to a null character ('0'). The credit limit and account
balance data members should be set to 0.
(If you're working in C++11 and you initialized the data members at declaration as described
above under C++11 Initialization Option for Data Members, this method's body can be empty.
You still need to code the method though, even though it won't actually do anything.)
Alternate CreditAccount constructor - Write another constructor for the CreditAccount class that
takes four parameters: 1) a character array that contains a new account number, 2) a character
array that contains a new customer name, 3) a double variable that contains a new credit limit,
and 4) a double variable that contains a new balance. DO NOT GIVE THESE PARAMETERS
THE SAME NAMES AS YOUR DATA MEMBERS.. Like all C++ constructors, this
constructor does not have a return data type.
Use strcpy() to copy the new account number parameter into the account number data member
and the new customer name parameter into the customer name data member. The new credit
limit and new account balance parameters can be assigned to the corresponding data members.
getAccountNumber() - This accessor method takes no parameters. It should return the account
number data member. In C++, the usual return data type specified when you are returning the
name of a character array is char* or "pointer to a character" (since returning an array's name
will convert the name into a pointer to the first element of the array, which in this case is data
type char.
getName() - This accessor method takes no parameters. It should return the customer name data
member.
getLimit() - This accessor method takes no parameters. It will have a return data type of double.
It should return the credit limit data member.
getBalance() - This accessor method takes no parameters. It will have a return data type of
double. It should return the account balance data member.
processPayment() - This method takes one parameter, a double payment amount. It returns
nothing. The payment amount should be subtracted from the current account balance data
member. (Note that it is possible to have a negative balance on an account as a result of
overpayment.)
processCharge() - This method takes one parameter, a double charge amount. It returns a
Boolean value. If the charge amount plus the current account balance is greater than the credit
limit, the method should return false without altering the balance (because this charge has been
declined). Otherwise, the charge amount should be added to the account balance and the method
should return true.
print() - This method takes no parameters and returns nothing. The method should print the
values of the data members for the account in a format similar to the following:
4. If the balance is negative, it should be printed as a positive number but followed by the letters
"CR" (for credit). For example, the sample output shown above is for an account with a balance
of -127.65.
Step 3: Test and debug the CreditAccount class
As you write your declaration and implementation of the CreditAccount class, you should begin
testing the code you've written. Create a basic main program called assign2.cpp that tests your
class. This is not the final version of assign2.cpp that you will eventually submit. In fact, you'll
end up deleting most (or all) of it by the time you're done with the assignment. An example test
program is given below.
You do not have to have written all of the methods for the CreditAccount class before you begin
testing it. Simply comment out the parts of your test program that call methods you haven't
written yet. Write one method definition, add its prototype to the class declaration, uncomment
the corresponding test code in your test program, and then compile and link your program. If you
get syntax errors, fix them before you attempt to write additional code. A larger amount of code
that does not compile is not useful - it just makes debugging harder! The goal here is to
constantly maintain a working program.
Once your CreditAccount class has been thoroughly tested and debugged, it's time to write the
second class for this assignment.
Step 4: Write the AccountDB class declaration
The AccountDB class represents a database of CreditAccount objects. Like the CreditAccount
class, the code for this class will be placed in two separate files.
Place the class declaration in a header file called AccountDB.h. Like the file CreditAccount.h
you wrote in Step 1, this file should begin and end with header guards to prevent it from
accidentally being #included more than once in the same source code file.
After the header guard at the top of the file but before the class definition, make sure to #include
"CreditAccount.h".
Data Members
The AccountDB class should have the following two private data members:
An array of 20 CreditAccount objects
An integer that specifies the number of CreditAccount objects actually stored in the array
Note: Once again, make sure you code your data members in THE EXACT ORDER LISTED
ABOVE and with THE EXACT SAME DATA TYPES.
Method Prototypes
The AccountDB class declaration should (eventually) contain public prototypes for all of the
methods in the AccountDB.cpp source code file described in Step 5 below.
Step 5: Write the AccountDB class implementation
5. The AccountDB class implementation should (eventually) contain definitions for all of the
methods described below. Make sure to #include "AccountDB.h" at the top of this file.
AccountDB default constructor - This "default" constructor for the AccountDB class takes no
parameters. Like all C++ constructors, it does not have a return data type.
This constructor is called to create an empty database, so this method should set the number of
accounts data member to 0.
(As with the CreditAccount class, if you initialize the number of accounts data member to 0
when you declare it, this method's body can be empty. You still need to code the method with an
empty body.)
Alternate AccountDB constructor - Write a second constructor for the AccountDB class that
takes one parameter: a C++ string that contains the name of an existing database file. Like all
C++ constructors, this constructor does not have a return data type.
This constructor should do the following:
Declare an input file stream variable (the code below assumes it is named inFile).
Open the file stream for binary input. Check to make sure the file was opened successfully as
usual.
Read the database file into your AccountDB object. You can do this with a single statement:
Close the file stream.
print() - This method takes no parameters and returns nothing.
This method should first print a descriptive header line (e.g., "Credit Card Account Listing"). It
should then loop through the array of CreditAccount objects and print each of the elements that
contains account data, with a blank line between each account. Here we see some of the power of
object-oriented programming: since each element of the array is an object, we can call a method
for that object. We've already written a print() method for the CreditAccount class, so printing
an element of the account array is as easy as calling print() for the array element. The syntax for
calling a method using an array element that is an object is pretty straightforward:
Step 6: Write the main program
Since most of the logic of the program is embedded in the two classes you wrote, the main()
routine logic is extremely simple.
Create an AccountDB object using the alternate constructor you wrote. Pass the filename string
literal "accounts" as an argument to the constructor.
Call the print() method for the AccountDB object.
here is part 2 and what I have coded for it:
Part 2
6. Purpose
This part of the assignment introduces the insertion sort and binary search algorithms. It also
introduces the use of makefiles for compiling and linking your programs.
Set Up
In your Assignment 2 directory, make a symbolic link to the data file for this part of the
assignment:
In this assignment, you will be creating several source code and header files, as described below.
You can create each of these files separately using the nano editor, just as you did on Assignment
1.
Once you've written a makefile for your program, you can compile and link it by simply typing:
Running the executable file is unchanged from Part 1.
To remove the executable and object code files for your program (conserving disk space), you
can type:
Program
For this part of the assignment, you'll need to write one new file and then modify two of the files
you wrote for Part 1.
Step 1: Write a makefile
The file named makefile tells the make utility how to build the final executable file from your
collection of C++ source code and header files. The makefile for this assignment is given in its
entirety below. Makefiles for future assignments will follow this basic pattern.
IMPORTANT NOTE: The commands that appear in the makefile below MUST be indented as
shown. Furthermore, the indentation MUST be done using a tab character, not spaces. If you
don't indent your makefile commands, or indent using spaces, your makefile WILL NOT
WORK.
Once you've written the file makefile, try using the make utility to compile and link your
program.
Step 2: Add the following methods to the AccountDB class
sortAccounts() - This method takes no parameters and returns nothing.
This method should sort the array of CreditAccount objects in ascending order by account
number using the insertion sort algorithm.
The sort code linked to above sorts an array of integers called numbers of size size. You will
need to make a substantial number of changes to that code to make it work in this program:
This will be a method, not a function. Change the parameters for the method to those described
above.
In the method body, change the data type of bucket to CreditAccount. This temporary storage
will be used to swap elements of the array of CreditAccount objects.
7. In the method body, change any occurrence of numbers to the name of your array of
CreditAccount objects and size to numAccounts (or whatever you called the data member that
tracks the number of valid CreditAccount objects stored in the array).
The comparison of accountArray[j-1] and bucket will need to use the C string library function
strcmp() to perform the comparison. Also, you'll need to use the getAccountNumber() method to
access the accountNumber data member within each CreditAccountobject. The final version of
the inner for loop should look something like this:
It is legal to assign one CreditAccount object to another; you don't need to write code to copy
individual data members.
Add a call to the sortAccounts() method to the end of the alternate constructor you wrote for the
AccountDB class. This will sort the array of CreditAccount objects that were read in from the
input file.
searchForAccount() - This method should take one parameter: a character array containing the
account number code of the CreditAccount to search for (searchNumber). The method should
return an integer.
The logic for this method is a variation of the binary search of a sorted list strategy.
As usual, you'll need to use strcmp() to perform the comparison of account numbers.
processTransactions() - This method should take one parameter: a C++ string containing the
name of a file of credit card transaction data. The method should return nothing.
The method should open the specified transaction file for input (not binary input - this file is a
text file). Make sure to test that the file was opened successfully; if it wasn't, print an error
message and exit the program.
Before reading any transactions, the function should print a report header and column headers.
The function should then read transaction data from the file until end of file is reached. A typical
transaction is shown below. The first field on the transaction record is the date of the transaction,
followed by an account number, then the transaction type ('C' for charge or 'P' for payment),
and finally a transaction amount.
Once all of the data for a given transaction has been read, call the searchForAccount() method to
search the accounts array for the account number given in the transaction. If the account number
is present in the array, then the transaction may be processed. For a payment, simply call the
processPayment() method for the object that contains a matching account number, passing it the
transaction amount. For a charge, call the processCharge() method for the object that contains a
matching account number, passing it the transaction amount.
For each transaction record processed, print a line in a transaction report with the data from the
record and the updated balance for that account. If the balance is negative, it should be printed as
a positive number but followed by the letters "CR". If the transaction account number was not
8. found in the account array or if a charge exceeded the account's credit limit (i.e., if the
processCharge() method returned false), print an appropriate error message instead of the
account balance.
After all transactions have been processed, close the transaction file.
Step 3: Add two method calls to the main program
The main() routine logic will now look like this:
Create an AccountDB object using the alternate constructor you wrote. Pass the filename string
"accounts" as an argument to the constructor.
Call the print() method for the AccountDB object.
Call the processTransactions() method for the AccountDB object. Pass the filename string
"transactions.txt" as an argument to the method.
Call the print() method for the AccountDB object.
And what I have for part 2, though it may not be correct:
# PROGRAM: assign2
# PROGRAMMER:
# LOGON ID:
# DATE DUE:
#
#include
#include
#include
#include
#define SIZE 20
#define ACCOUNTS /home/turing/t90kjm1/CS241/Data/Spring2017/Assign2/accounts
#define TRANS /home/turing/t90kjm1/CS241/Data/Spring2017/Assign2/transactions.txt
using namespace std;
class CreditAccount
{
public:
CreditAccount();
char* get_accountNumber();
float get_balance();
void process_payment( float );