Create a directory named project

Assignment Help Other Subject
Reference no: EM132845501

Project Overview: In this project, you will use Smalltalk to complete the same shape project done previously. You will implement one base class (Shape) and four (4) derived classes (Sphere, Cylinder, Cone, and Cuboid). They need to be saved into five different files, shape.st, sphere.st, cylinder.st, cone.st, and cuboid.st respectively.

For this project, you also need to write the main.st file that will read the shaper from a file with its filename furnished as a command line argument. You can download a sample shapes file named shapes.dat, as shown below. Each shape occupies one line in the file and two attributes of a shape are separated by one or more spaces. The number of shapes in the file is unknown in advance.

Cube#1 cuboid 1 1 1
Cube#2 cuboid 2 2 2
Cone#1 cone 1 1
Cyl#1 cylinder 1 1
Box#1 cuboid 2 4 6
Box#2 cuboid 10.5 21 10.5
UnitSphere sphere 1
LargeSphere sphere 100
Cone#2 cone 1 2
Cyl#2 cylinder 1 2

The user can execute your program using the following command, assuming shapes.dat is the shapes file. gst shape.st sphere.st cylinder.st cone.st cuboid.st -f main.st shapes.dat

If the number of arguments is incorrect, please print out a usage message and quit. If the file can't be opened for reading, print out an error message to indicate it and quit. If the file can be opened, you can assume it follows the correct format and it contains correct attributes.

The user can then issue one of the following queries: count, countN, print, printN, min, minN, max, maxN, total, totalN, avg, avgN. Here N is a positive integer to indicate the number of test conditions to be imposed with the query. Without N, the query will be unconditional (performed on all the shapes). If N appears, the user needs to enter N test conditions one by one, and the query will be performed on the shapes that satisfy all the N test conditions.

Each test condition will be in the <name> <op> <value> format. The <name> string can be "type", "area" or "volume" (without the quotation marks). The <op> string can be one of the six relational operators ("==", "!=", ">=", "<=", ">", and "<"). The <value> string is the reference value in the string format to be compared with. For example, "type" ">" "cyl", "area" "<=" "1000", and "volume" ">" "100.5" are three examples of test conditions.

The user can keep issuing the queries until the user enters the quit command. Please see the sample executions at the end for details. You can assume the user will enter the queries and the test conditions correctly.

It is not required, but it might be a good idea to define another class in main.st to represent a list of shapes read from the file and the class can respond to the messages that correspond different quarries issued by the user (i.e. count print min max total avg).

What You Need To Do
• Create a directory named project6 for this assignment. Download shapes.dat to the project6
directory.
• Create five classes to be saved in shape.st, sphere.st, cylinder.st, cone.st, and
cuboid.st respectively.
• Create another file named main.st to read the shapes file, and to accept and answer the queries issued by the user.
• When you are ready to submit your project, compress your project6 directory into a single (compressed) zip file, project6.zip.
• Once you have a compressed zip file named project6.zip, submit that zip file.

Attachment:- ven details.rar

Attachment:- shapes.rar

Reference no: EM132845501

Questions Cloud

What is the probability that the store will serve : What is the probability that the store will serve more than 16 customers in a particular two-hour period?
What does say about the local conflict over the condition : Image A is typical of images emphasizing the economic consequences of globalization. Does globalization appear to be a force that is subject to human control
Discuss about the politics and social media : The purpose of this assignment is to look at the ways in which politicians and political movements use social media and the effect it has on their cause.
What is the adjusted r square value : Now run the linear regression. What is the Adjusted R square value? Is the regression significant? What is the B coefficient for educ? Interpret it.
Create a directory named project : Write the main.st file that will read the shaper from a file with its filename furnished as a command line argument. You can download a sample shapes file named
What will be reported for accounts receivable : The company bases its provision for credit losses on the aging analysis. What will be reported for 'accounts receivable, net' on December 31, 2021 balance sheet
How does linear regression differ from multiple regression : Linear regression is a statistical technique using a regression equation to determine the "line of best fit" from which a Y score can be predicted from an X sco
Analyze the development and portrayal of the characters : Select a current TV show or movie. Analyze the development and portrayal of the characters in the movie or show. Are stereotypes present?
What was the purpose of the constitution according to howard : What was the purpose of the constitution according to Howard Zinn and Dr. Carlos? What role and more importantly, purpose, did racism play in the development

Reviews

len2845501

3/31/2021 2:18:39 AM

Project Overview: In this project, you will use Smalltalk to complete the same shape project done previously. You will implement one base class (Shape) and four (4) derived classes (Sphere, Cylinder, Cone, and Cuboid). They need to be saved into five different files, shape.st, sphere.st, cylinder.st, cone.st, and cuboid.st respectively. That's the Shapes.data file mentioned in the details. You need to use it. Please forward it to the person working on this assignment.

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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