Sale!

CSE 1325 Homework #1 Hello World and Some More solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (3 votes)

For this homework assignment, you will be writing a “Hello World” Program, but with some
extra lines of output, asking for user input, and performing arithmetic operations on ints and
doubles.
First, you must set up your Ubuntu environment (see class slides).
Second, you must write a program, called “abc1234_Hello_World_1.cpp” (replace abc1234 with
your netid), using C++ style coding that does the following:
 Say “Hello User” to the user when the program is created
 Ask the user for their name
 Take their name as input
 Thank the user by name for telling you their name
 Ask for two numbers (ints)
 Take in two numbers (ints)
 Show the Sum of these two numbers as an int
 Show the Difference of these two numbers as an int (Num1 – Num 2)
 Show the Product of these two numbers as an int
 Show the Quotient of these two numbers as an int (Num 1 / Num 2)
 Ask for two more numbers (doubles)
 Take in two numbers (doubles)
 Show the Sum of these two numbers as a double
 Show the Difference of these two numbers as a double (Num1 – Num 2)
 Show the Product of these two numbers as a double
 Show the Quotient of these two numbers as a double (Num 1 / Num 2)
 Thank the user “by name” for their time
Bonus (5 pts)
Create a second file called “abc1234_Hello_World_2.cpp”. This will do the exact same thing as
above, but with one main difference. You will not ask for the user’s name. Instead, you must
figure out the user’s name by some other means. It is acceptable to be a user name, proper
name, or some other identifying name for that person. The name cannot be hard-coded in the
source file. Test your program in two different user accounts (create a 2nd account on your
Ubuntu copy with different profile information) and see if it works.
Deliverables
You will submit your code via Blackboard. You will upload a ZIP file, named “abc1234_HW1.zip”,
containing 1 folder named “abc1234” and 1 file (2 if you did bonus). Below is an example of the
file structure I’m requesting. Replace abc1234 with your netID
 abc1234
o abc1234_Hello_World_1.cpp (source code)
o abc1234_Hello_World_2.cpp (source code) (BONUS ONLY)
Your code must compile and run with the following commands (For bonus, replace 1 with 2):
 g++ -std=c++17 -o abc1234_Hello_World_1 abc1234_Hello_World_1.cpp
 ./abc1234_Hello_World_1
Full credit files named incorrectly will result in a loss of 5 points each. Failure to follow proper
file structure will result in a loss of 5 points. Bonus files named incorrectly will result in a loss of
1 bonus point each.