PrintProgram

Downloads 1

Write a complete Java program in a class named “PrintProgram” whose output is the text that would be the source code of a Java program named Hello that prints “Hello, world!” As its output.

Mobile Service Provider

Downloads 2

Programming Challenge 25: Mobile Service Provider(Page 228)For this program, make sure you include the following modifications- Make sure customer name and billing month is accepted. Billing month should be in the range 1-12. If it is not, please display an error message.- Make sure a user enters only ‘A’, ‘B’ or ‘C’ for the plan package code. Display an error message if any other letter is entered.- Only if a valid package code(‘A’,’B’, or ‘C’) is entered, then the user should be asked to enter the number of gigabytes used- Display a bill with month of bill, customer name, package code, charges included in package deal, and charge for additional data. Make sure you use identifying labels too.For Programming Challenge 25, you will need to send me the cpp file only .

A mobile phone service provider has three different subscription packages for its customers:

Package A: For $39.99 per month 450 minutes are provided. Additional minutes are $0.45 per minute.

Package B: For $59.99 per month 900 minutes are provided. Additional minutes are $0.40 per minute.

Package C: For $69.99 per month unlimited minutes provided.

Write a program that calculates a customer’s monthly bill. It should ask which package the customer has purchased and how many minutes were used. It should then display the total amount due.

Input Validation: Be sure the user only selects package A, B, or C.

Lines

Downloads 3

Write a program that allows the user to navigate the lines of text in a file. The program should prompt the user for a filename and input the lines of text into a list. The program then enters a loop in which it prints the number of lines in the file and prompts the user for a line number. Actual line numbers range from 1 to the number of lines in the file. If the input is 0, the program quits. Otherwise, the program prints the line associated with that number.

FirstLastName

Downloads 4

Request a first and last name from the console.
Store each into a separate string variable

.Output the contents of both variables to the console three times:
1) separated by a space
2) separated by a tab
3) separated by a line

The program must precisely match the example output for credit.

Write a program named HoursAndMinutes

Downloads 6

Write a program named HoursAndMinutes that declares a minutes variable to represent minutes worked on a job, and assign a value to it.Display the value in hours and minutes. For example, if 98 is assigned to the minutes variable, the output would be: 98 minutes is 1 hours and 38 minutes.Note: For final submission assign 197 to the minutes variable

For each of the following, write a single c++ statement that performs the specified task

Downloads 7

1. For each of the following, write a single c++ statement that performs the
specified task. Assume that floating-point variables number1 and number2 have been
declared and that number1 has been initialized to 7.3. Assume that variable ptr is a type
of char *. Assume that arrays s1 and s2 are each 100-element char arrays that are
initialized with string literals.
a) Declare the variable fPtr to be a pointer to an object of type double.
b) Assign the address of variable number1 to pointer variable fPtr.
c) Print the value of the object pointed to by fPtr.
d) Assign the value of the object pointed to by fptr to variable number2.
e) Print the value of number2.
f) Print the address of number1.
g) Print the address stored in fPtr. Is the value printed the same as the address of
number2?

You are given a file consisting of students’ names

Downloads 8

You are given a file consisting of students’ names in the following form: lastName, firstName midddleName. (Note that a student may not have a middle name.) Write a program that converts each name to the following form: firstName middleName lastName. Your program must read student’s entire name in a variable and must consist of a function that takes as input a string, consists of a student’s name, and returns the string consisting of the altered name. Use the string function find to find the inex of ,; the function length to find the length of the string; and the function substr to extract the firstName, middleName, and lastName.

The input file looks like this:
Miller, Jason Brian
Blair, Lisa Maria
Gupta, Anil Kumar
Arora, Sumit Sahil
Saleh, Rhonda Beth

Write a program that displays the contents of a file in four columns

Downloads 9

Write a program that displays the contents of a file in four columns titled “Item Name”, “Num of Items”, “Item Price”, “Total”. The total is the is the quantity of each item sold multiplied by the item price. This program should not use an array. However, it should read all values from file named “itemFile.txt”, perform calculations where possible, and display everything in the C++ output window. The program should also calculate the total price of all items sold. Copy the contents of your file and paste them below your program. Submit your program together with the output.

Suppose that one of the biggest car sales companies

Downloads 10

Suppose that one of the biggest car sales companies promised you an offer. Therefore, they
have requested that you write a simple program that will help to assign a code consisting of only
three characters. The first character is either the letter L which indicates that the employee
deserves the certificate for long-term service, or the letter I which indicates that an employee is
still an intern. The second character is either 3 indicating that the employee works at a dispatch
department or 4 indicating that the employee works as a salesperson. Write a program that
requests the user to enter the code (L3, L4, I3, I4). The program should open the file named
“Employeecode.txt’, search the for the code, and display only the names of the employees
assigned to that code. E.g. if an employee works at a dispatch department with an employee
code as “L3A#John Uka”, then only John Uka should be displayed. The program must test
only the first two characters. Should the user enter an invalid code, then the appropriate error
message must be displayed.