Display the current date and time in a human-readable format

Assignment Help C/C++ Programming
Reference no: EM131666417

Computer Project Assignment

Assignment Overview

For this assignment, you are to design and implement a C/C++ program that will serve as a basic command-line interpreter (shell). You will design and implement additional functionality in subsequent projects.

Assignment Specifications

1. The program will repeatedly display a prompt containing the sequence number of the current command (starting at 1) and the username of the user executing the program. This information will be enclosed in the characters '<' and '>'. For example:

<1 mccullen>

The sequence number and username will be separated by a single space.

2. After displaying the prompt, the program will repeatedly read one line of input from the user and process it. An input line is defined as a sequence of zero or more tokens (character strings), separated by one or more delimiters (blanks and tabs), ending with a newline character. There will be no more than 128 characters in a line. If the first token is the name of a built-in command (listed below), then the program will take the appropriate action. Otherwise, the program will assume that it is an error.

3. The program will recognize the following built-in commands:

quit        terminate the shell process
env        display environment variables
date       display current date and time
curr        display absolute pathname of current working directory
cd          manage current working directory

Built-in commands will be completely processed by the program (the program will not create a child process to perform the processing).

4. The command "date" will display the current date and time in a human-readable format.

5. The command "env" will display the user's environment variables in a format similar to "setenv" in the C shell.

6. The command "curr" will display the absolute pathname of the current working directory.

7. The command "cd" (without any other tokens) will reset the current working directory to be the user's home directory; the command "cd DIR" will reset the current working directory to be "DIR", where that token may be a relative or absolute pathname.

8. The program will perform appropriate error handling. It will display an appropriate message if the user's command fails in any way.

Assignment Notes

1. As stated above, your source code file will be named "proj03.student.c"; that source code file may contain C or C++ statements.

2. You must use "g++" to translate your source code file in the CSE Linux environment.

3. Information about system calls and library functions which might be useful for this project may be viewed using the "man" utility. For example:

man 2 time
man 3 ctime
man 3 getcwd
man 3 cuserid
man 3 string

4. As noted above, you will extend your program in subsequent projects, so you would be wise to properly structure and comment your source code.

Attachment:- Project.rar

Reference no: EM131666417

Questions Cloud

What are the features of tropical forests : What are the features of Tropical forests? How are they different from that of rain forests?
Review an article in bloomberg businessweek : According to an article in Bloomberg Businessweek, New York City's most recent adult smoking rate is 14%. Suppose that a survey is conducted to determine.
Information about the constellation of satellites : You must include information about the constellation of satellites, how it measures your location, signal errors, and types of accuracies and types.
Reflects the agreement between you nancy bower : Write a sample contract that reflects the agreement between you Nancy Bower. The contract should be valid and enforceable.
Display the current date and time in a human-readable format : The command "date" will display the current date and time in a human-readable format. Display the absolute pathname of the current working directory.
Review problem-online courses taught at community colleges : Sixty-eight percent of online courses taught at community colleges nationwide were taught by full-time faculty. To test if 68% also represents California's.
Physical geography has influences people today : Are there any changes in religious practices in the modern day that may be attribute to physical geography?
Can you create a balance between base pay and commission : Can you create a balance between base pay and commission? Perhaps a commissions-only model would work for you?
Examine legislators position on a current health care bill : Examine legislators position on a current health care bill of your choice. Following the assignment guidelines below, develop an interview paper

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd