C/C++ 编程辅导

C/C++程序辅导 辅导C/C++编程作业

C++ Assignemnt


C++ Assignemnt


Use a Linked List and a set of Derived Classes from a Base Class to demonstrate polymorphism in C++. To do so, alter linked-list source code to run a family of mobile phone derived classes, and create a menu to demonstrate the functionality.  Students are allowed  to work in groups or cohorts. For ease of submission, please e-mail the instructor the members of your cohort before the due date.


The Linked List


Sample code is available to create a linked list on Blackboard.  Alter this code to create a linked list capable of handling the derivation tree of a series of mobile phones. The base class is mobile phone.


The linked list must be an independent class, and must have the following data and functions:

  • MobilePhone * head – a pointer to the first location in the linked list.
  • MobilePhone * tail – a pointer to the last location in the linked l

Loops, Arrays, Constructors, Methods

Loops, Arrays, Constructors, Methods

In languages that use the same or similar alphabets, some characters will occur with greater frequency that others. Consider the Latin alphabet, for example, used by most of Western and Central Europe and other parts of the world. Some languages, for example, may not use all of the 26 characters that we are used to. You can learn a lot about languages by comparing the relative frequencies of character use.

A table of frequencies might look something like this:

          *     *               
          *     *               
          *   * * *             
          *   * * *             
          *   * * *             
        * *   * * *             
      * * *   * * *             
      * * * * * * * *           
      * * * * * * * *           
      * * * * * * * * *         
      * * * * * * * * *         
      c d e l m n o p v 

In this project, we will write a program that takes

C++ Basic

#1. Timetest (30 points with 25 points for write-up and 5 points for timetest.cpp) The purpose of this question is to explore how different ADTs affect the runtime of a program.  The program simply inserts and/or deletes data items from an ADT.  The sequence of insert and delete operations is specified in a data file.  You will find four data files (File1.dat, File2.dat, File3.dat, and File4.dat) in ~neff/60/p1 that model different types of behavior and you should use these to analyze the performance of different ADTs.  The first line of each data file summarizes the operations in the file.    You will submit a typed, double-spaced, 2-4 page report (writeup.pdf) that summarizes your findings on the performance of each ADT for these different sets of operations.  Also submit the driver program described below.


Start by writing a driver program, timetest.cpp, that will ask for the name of an input file that contains a list of commands and then repeatedly ask the user for the ADT t

Parallel Computing and Dijkstra's Algorithm

Department of Computer Science Intro to Parallel Computing
Programming Assignment 3
Due Wednesday, October 28 at 6 pm
Dijkstra’s Algorithm
Edsger Dijkstra was a Dutch computer scientist. He is unquestionably one of the found-
ing fathers of computer science. In addition to devising Dijkstra’s algorithm, he was one
of the originators of structured programming | a precursor to modern object-oriented pro-
gramming. C, for example, is a structured programming language. He also made many
contributions to the solution of process-coordination problems in parallel computing: we’ll
learn about several later on in the course. His Wikipedia page lists more than fty funda-
mental contributions to computer science.
Dijkstra’s algorithm solves the single-source shortest path problem” in a weighted, di-
rected graph. The input consists of a weighted, directed graph and a speci ed vertex in the
graph. A directed graph or digraph is a collection of vertices and directed edges, which join
one vertex to another. A weighted dig

Battleship Recursion

CSCI-1200 Data Structures | Fall 2015
Homework 6 | Battleship Recursion
In this homework we will solve ship placement puzzles inspired by the pencil & paper Battleship” game that
was later made into a board game by Milton Bradley and then a puzzle that is a regular feature in Games
magazine. You can read more about the history of the game and see examples here:
This is a popular game with lots of material available online. You may not search for, study, or use any code
related to the Battleship game or puzzle. Please carefully read the entire assignment and study the examples
before beginning your implementation.

Linked lists #2


This assignment extends your work on hw06 with linked lists, but also includes an extra focus on algorithmic complexity. The goals are as follows:

  1. Learn how to keep data separate from containers
  2. Practice designing algorithms and data structures
  3. Practice using code that uses the following:
    1. linked lists
    2. structures for data encapsulation
    3. dynamic memory (i.e., malloc)
    4. struct initializer syntax (C99)
  4. Learn how analyze the complexity of algorithms

C++ basic

For this problem, you will use the rand function (srand, time) to generate a sequence S of k random integers in the range [m, m+1, …, n].

You will need to prompt the user to enter values for k, m, and n in your main function. Implement the MergeSort sorting technique as follows:

– Make a function called get_random that returns a random integer in the range [m, m+1, …, n]

int get_random(int m, int n)

c++ programm assignments

This project is the main assessment of this subject. It is worth 40% of your total

assessment. You are required to write a C++ program to solve all problems. All work is

to be completed individually. If parts or all of the source code you submit is not your own

work, you will receive ZERO.

Part 1. Design

This first part is worth 20% of you total assessment. It is consist of 5 tasks. You need to


• Programming object list

• Algorithm

• C++ Coding

Task1: Miles per Gallon.

A liter is 0.264179 gallons. Write a program that will read in the number of liters of

gasoline consumed by the user’s car and the number of miles traveled by the car, and

will then output the number of miles per gallon the car delivered. You must show the

outputs as given in the example. You must show the numbers in fixed point left justified

and in three decimal places as in the example.


This program read the number of liters of gasoline consumed (gasoline In

Liters) and the number of miles traveled by the ca

ESE 224 minesweep 实现

ESE 224 Spring 2015 Course Project Description

Over the course of this semester, you learn various coding concepts in C++ that are applicable to programming in general. This class project is designed to show you how many of these concepts can be used together in a single application and will test your familiarity with programming these concepts. This project is intended for 2-4 people groups.

We will provide a rigid skeleton guide which you MUST follow, but how to implement components in the skeleton is your decision. This means that any public method signature should not be modified (its return type, name, and parameters). However, you are free to remove, add, or edit any private methods you feel necessary. The private methods are included as a guideline to structuring and organizing your code. The private variables should also not be modified, as much of the public functions rely on these private variables. This means we (i.e

CSCI212 assignment3 solution: shell interpreter implementation



Assignment 3 (7.5 marks)

Due 11:59pm Sunday May 17, 2015.

The aim of this assignment is to write a simple shell interpreter demonstrating you knowledge of process

control. In addition to this you will get some experience with file system API’s.

Task One (4.5 marks)

You first task is to write a simple shell interpreter, which executes commands. You shell interpreter should

display a $ prompt and wait for user input.

You shell interpreter is to be a little simplistic, all you can do is execute commands. If a command cannot be

found you should display a suitable error message. When executing a command the shell interpreter should

wait until the command terminates. To implement command execution simply use the function call fork()

and exec(). Note that there are many variations on the exec() function call. To block the shell, you

should use the wait() (or similar) function call.

At the end of this step you should be able to do this:

$ ./foobar

./foobar does not exist.

$ ls